From 9d10911301662eb3ae8f81fbc5e44755210f547d Mon Sep 17 00:00:00 2001 From: Lukas Ertl Date: Mon, 26 Mar 2007 23:29:20 +0000 Subject: 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 --- pw/pw.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'pw/pw.c') 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, ""); -- cgit v1.2.3