Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions judge/runguard.cc
Original file line number Diff line number Diff line change
Expand Up @@ -923,9 +923,7 @@ void setrestrictions()
/* Set group-id (must be root for this, so before setting user). */
if ( use_group ) {
if ( setgid(rungid) ) error(errno,"cannot set group ID to `%d'",rungid);
gid_t aux_groups[1];
aux_groups[0] = rungid;
if ( setgroups(1, aux_groups) ) error(errno,"cannot clear auxiliary groups");
if ( setgroups(0, NULL) ) error(errno,"cannot clear auxiliary groups");

verbose("using group ID `%d'",rungid);
}
Expand Down
Loading