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-stable
Commits
89e515a8
Commit
89e515a8
authored
Nov 29, 2000
by
Leigh B. Stoller
Browse files
Add passwd file check in case mkacct did not do its thing (or was not run).
parent
473d2525
Changes
1
Hide whitespace changes
Inline
Side-by-side
tbsetup/mkprojdir
View file @
89e515a8
...
...
@@ -67,6 +67,12 @@ if ($db_result->numrows < 1) {
my
$gid
=
$row
[
0
];
my
$head
=
$row
[
1
];
#
# This acts as check (and we need the numeric uid) in case mkacct failed!
#
my
(
$login
,
$pass
,
$uid
)
=
getpwnam
(
$head
)
or
die
"
$head
not in passwd file
";
#
# Okay, do it.
#
...
...
@@ -74,9 +80,6 @@ if (! mkdir("$PROJROOT/$pid", 0770)) {
die
("
Could not make directory
$PROJROOT
/
$pid
: $!
\n
");
}
my
(
$login
,
$pass
,
$uid
)
=
getpwnam
(
$head
)
or
die
"
$head
not in passwd file
";
if
(
!
chown
(
$uid
,
$gid
,
"
$PROJROOT
/
$pid
"))
{
die
("
Could not chown
$PROJROOT
/
$pid
to
$uid
/
$gid
: $!
\n
");
}
...
...
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