summaryrefslogtreecommitdiff
path: root/src/newusers.c
diff options
context:
space:
mode:
authorBalint Reczey <balint.reczey@canonical.com>2020-02-06 23:14:47 +0100
committerBalint Reczey <balint.reczey@canonical.com>2020-02-06 23:14:47 +0100
commitd906ecd3b652d95af6ffb974a2f6669501bb9496 (patch)
tree178a8f140927896970f47930dae9213161268f10 /src/newusers.c
parent69d932140c70455a282b6e7115d9caf0cc56d6ff (diff)
downloadshadow-d906ecd3b652d95af6ffb974a2f6669501bb9496.tar.gz
New upstream version 4.8.1upstream/4.8.1
Diffstat (limited to 'src/newusers.c')
-rw-r--r--src/newusers.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/newusers.c b/src/newusers.c
index 99c69f78..e9fe0e27 100644
--- a/src/newusers.c
+++ b/src/newusers.c
@@ -1216,9 +1216,9 @@ int main (int argc, char **argv)
if ( ('\0' != fields[5][0])
&& (access (newpw.pw_dir, F_OK) != 0)) {
/* FIXME: should check for directory */
- mode_t msk = 0777 & ~getdef_num ("UMASK",
- GETDEF_DEFAULT_UMASK);
- if (mkdir (newpw.pw_dir, msk) != 0) {
+ mode_t mode = getdef_num ("HOME_MODE",
+ 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK));
+ if (mkdir (newpw.pw_dir, mode) != 0) {
fprintf (stderr,
_("%s: line %d: mkdir %s failed: %s\n"),
Prog, line, newpw.pw_dir,