Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
f528729e
Commit
f528729e
authored
Sep 25, 2008
by
Leigh B. Stoller
Browse files
Set umask accordingly when creating home directories so that sshd
does not complain.
parent
3258f84b
Changes
1
Hide whitespace changes
Inline
Side-by-side
tmcd/linux/liblocsetup.pm
View file @
f528729e
...
...
@@ -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
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment