summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pw/pw.c
diff options
context:
space:
mode:
authorle <le@FreeBSD.org>2007-03-26 23:29:20 +0000
committerle <le@FreeBSD.org>2007-03-26 23:29:20 +0000
commitb25ea91d228fbda021f6a83bb11dbea117ac3b47 (patch)
treedc6830771995e3c872004f769a85ca523d17675a /usr.sbin/pw/pw.c
parent4115ef0fbb5395aa1d9980b686f8f81106a907e3 (diff)
downloadFreeBSD-src-b25ea91d228fbda021f6a83bb11dbea117ac3b47.zip
FreeBSD-src-b25ea91d228fbda021f6a83bb11dbea117ac3b47.tar.gz
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 'usr.sbin/pw/pw.c')
-rw-r--r--usr.sbin/pw/pw.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/pw/pw.c b/usr.sbin/pw/pw.c
index 58b4200..54a08fb 100644
--- a/usr.sbin/pw/pw.c
+++ b/usr.sbin/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, "");
OpenPOWER on IntegriCloud