summaryrefslogtreecommitdiffstats
path: root/pw/pw.c
diff options
context:
space:
mode:
authorLukas Ertl <le@FreeBSD.org>2007-03-26 23:29:20 +0000
committerLukas Ertl <le@FreeBSD.org>2007-03-26 23:29:20 +0000
commit9d10911301662eb3ae8f81fbc5e44755210f547d (patch)
tree1080f32f1e9c76fc22c694105d44093118541d7e /pw/pw.c
parentb7ca0fb0cefab36f28337f65b3ae12b94f637527 (diff)
downloadpw-darwin-9d10911301662eb3ae8f81fbc5e44755210f547d.tar.gz
pw-darwin-9d10911301662eb3ae8f81fbc5e44755210f547d.zip
Introduce the new option -M to allow to set the permissions of
the user's newly created home directory. If omitted, it's derived from the current umask. PR: bin/16880, bin/83253 (partially), bin/104248 MFC in: 1 month
Diffstat (limited to 'pw/pw.c')
-rw-r--r--pw/pw.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/pw/pw.c b/pw/pw.c
index 58b4200..54a08fb 100644
--- a/pw/pw.c
+++ b/pw/pw.c
@@ -106,9 +106,9 @@ main(int argc, char *argv[])
static const char *opts[W_NUM][M_NUM] =
{
{ /* user */
- "V:C:qn:u:c:d:e:p:g:G:mk:s:oL:i:w:h:H:Db:NPy:Y",
+ "V:C:qn:u:c:d:e:p:g:G:mM:k:s:oL:i:w:h:H:Db:NPy:Y",
"V:C:qn:u:rY",
- "V:C:qn:u:c:d:e:p:g:G:ml:k:s:w:L:h:H:FNPY",
+ "V:C:qn:u:c:d:e:p:g:G:mM:l:k:s:w:L:h:H:FNPY",
"V:C:qn:u:FPa7",
"V:C:q",
"V:C:q",
@@ -129,7 +129,6 @@ main(int argc, char *argv[])
pw_group
};
- umask(0); /* We wish to handle this manually */
LIST_INIT(&arglist);
(void)setlocale(LC_ALL, "");