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

Add setgroups code (or Perl silly equivalent) so that startup commands

run with the user group set. Bug reported by Eric.
parent a8955488
......@@ -97,9 +97,15 @@ if ($mypid) {
}
else {
#
# The child becomes the user and runs the command.
# The child becomes the user and runs the command. Maybe cleaner to
# just use sudo instead, so we get the entire group list of the
# target user?
#
$EGID = $GID = $gid;
my $glist = `id -G $login`;
chomp($glist);
$GID = $gid;
$EGID = $glist;
$EUID = $UID = $uid;
exec($runcmd);
......
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