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

Fix up the group list problem that Mac reported wrt the user not being

in the full set of subgroups, which can break swapping an experiment
created in a subgroup.
parent 8866d937
......@@ -127,10 +127,26 @@ TBGroupUnixInfo($pid, $gid, \$unix_gid, \$unix_gname) or
die("*** $0:\n".
" No such group $pid/$gid\n");
#
# Need the entire group list for the user, cause of subgroups, and cause
# thats the correct thing to do. Too bad perl does not have a getgrouplist
# function like the C library. Maybe its cleaner to just use sudo? Should
# we get this info from the DB instead of using "id?"
#
my $glist = `id -G $creator`;
if ($glist =~ /^([\d ]*)$/) {
$glist = $1;
}
else {
die("*** $0:\n".
" Unexpected results from 'id -G $creator': $glist\n");
}
# Send the email now, which terminates the audit.
AuditEnd();
$EGID = $GID = $unix_gid;
$GID = $unix_gid;
$EGID = $unix_gid . " " . $glist;
$EUID = $UID = $unix_uid;
$ENV{'USER'} = $creator;
$ENV{'LOGNAME'} = $creator;
......
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