From c9d5cd3d47862e926a0e6e0ace7618f59a0203bb Mon Sep 17 00:00:00 2001 From: Mac Newbold Date: Wed, 11 Jun 2003 18:08:03 +0000 Subject: [PATCH] Do some fancy bit flipping with the groups to make sure we pick up all of them. --- tbsetup/idleswap.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tbsetup/idleswap.in b/tbsetup/idleswap.in index e27adad9d..7f7b495ea 100644 --- a/tbsetup/idleswap.in +++ b/tbsetup/idleswap.in @@ -147,8 +147,14 @@ else { # Send the email now, which terminates the audit. AuditEnd(); +# Remove current group from glist, then add gid twice at the front of the list +# Order matters here, or we won't pick up all the groups we need. + +$glist =~ s/ ?\b$unix_gid\b ?//; +$glist = $unix_gid . " " . $unix_gid . " " . $glist; + $GID = $unix_gid; -$EGID = $unix_gid . " " . $glist; +$EGID = $glist; $EUID = $UID = $unix_uid; $ENV{'USER'} = $creator; $ENV{'LOGNAME'} = $creator; -- GitLab