Lines 1507-1516
Link Here
|
1507 |
my $gids = get_user_groups($touid); |
1507 |
my $gids = get_user_groups($touid); |
1508 |
my ( $pgid, $supgs ) = split (' ',$gids,2); |
1508 |
my ( $pgid, $supgs ) = split (' ',$gids,2); |
1509 |
defined $supgs or $supgs=$pgid; |
1509 |
defined $supgs or $supgs=$pgid; |
1510 |
if ($( != $pgid) { |
1510 |
if ((split (' ',$())[0] != $pgid) { |
1511 |
# Gotta be root for any of this to work |
1511 |
# Gotta be root for any of this to work |
1512 |
$> = 0 ; |
1512 |
$> = 0 ; |
1513 |
dbg("util: changing real primary gid from $( to $pgid and supplemental groups to $supgs to match effective uid $touid"); |
1513 |
dbg("util: changing real primary gid from " . (split (' ',$())[0] . " to $pgid and supplemental groups to $supgs to match effective uid $touid"); |
1514 |
POSIX::setgid($pgid); |
1514 |
POSIX::setgid($pgid); |
1515 |
dbg("util: POSIX::setgid($pgid) set errno to $!"); |
1515 |
dbg("util: POSIX::setgid($pgid) set errno to $!"); |
1516 |
$! = 0; |
1516 |
$! = 0; |