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
commit2006070a9af6d707e31fecbc4eca8df34e9997b6 (patch)
tree80ec1506f7bb1d70e8b6542c1cd55b438f8f6cf3 /pw/pw.c
parent50a7ffedcffc04d8fed26606e47ab9d53fc04125 (diff)
downloadpw-darwin-2006070a9af6d707e31fecbc4eca8df34e9997b6.tar.gz
pw-darwin-2006070a9af6d707e31fecbc4eca8df34e9997b6.tar.zst
pw-darwin-2006070a9af6d707e31fecbc4eca8df34e9997b6.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, "");