Commit f528729e authored by Leigh B. Stoller's avatar Leigh B. Stoller

Set umask accordingly when creating home directories so that sshd

does not complain.
parent 3258f84b
......@@ -746,12 +746,15 @@ sub os_useradd($$$$$$$$$)
# Map the shell into a full path.
$shell = MapShell($shell);
my $oldmask = umask(0022);
if (system("$USERADD -u $uid -g $gid $args -p '$pswd' ".
"-s $shell -c \"$gcos\" $login") != 0) {
warn "*** WARNING: $USERADD $login error.\n";
umask($oldmask);
return -1;
}
umask($oldmask);
return 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment