View | Details | Raw Unified | Return to bug 7629
Collapse All | Expand All

(-)lib/Mail/SpamAssassin/Util.pm (-2 / +3 lines)
Lines 1506-1516 Link Here
1506
  my $touid = $>;
1506
  my $touid = $>;
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
  my ( $oldpgid, $oldsupgs ) = split (' ',$(,2);
1509
  defined $supgs or $supgs=$pgid;
1510
  defined $supgs or $supgs=$pgid;
1510
  if ($( != $pgid) {
1511
  if ( $oldpgid != $pgid) {
1511
    # Gotta be root for any of this to work
1512
    # Gotta be root for any of this to work
1512
    $> = 0 ;
1513
    $> = 0 ;
1513
    dbg("util: changing real primary gid from $( to $pgid and supplemental groups to $supgs to match effective uid $touid");
1514
    dbg("util: changing real primary gid from " . $oldpgid . " to $pgid and supplemental groups from $oldsupgs to $supgs to match effective uid $touid");
1514
    POSIX::setgid($pgid);
1515
    POSIX::setgid($pgid);
1515
    dbg("util: POSIX::setgid($pgid) set errno to $!");  
1516
    dbg("util: POSIX::setgid($pgid) set errno to $!");  
1516
    $! = 0;
1517
    $! = 0;

Return to bug 7629