aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/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
commiteebbeceec9812ff065fb03a10e66742094a12a11 (patch)
treedc6830771995e3c872004f769a85ca523d17675a /usr.sbin/pw/pw.c
parentabedf9eb2f411fc983c98c18a0a1eda1a8103572 (diff)
downloadsrc-eebbeceec9812ff065fb03a10e66742094a12a11.tar.gz
src-eebbeceec9812ff065fb03a10e66742094a12a11.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
Notes
Notes: svn path=/head/; revision=167919
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 58b420008c13..54a08fb5c02d 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, "");