Commit 89e515a8 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Add passwd file check in case mkacct did not do its thing (or was not run).

parent 473d2525
......@@ -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");
}
......
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