Skip to content

Commit

Permalink
Update judge/runguard.cc
Browse files Browse the repository at this point in the history
Co-authored-by: Jaap Eldering <[email protected]>
  • Loading branch information
meisterT and eldering authored Feb 25, 2024
1 parent 79b2f37 commit d4af53f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion judge/runguard.cc
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,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[10];
gid_t aux_groups[1];
aux_groups[0] = rungid;
if ( setgroups(1, aux_groups) ) error(errno,"cannot clear auxiliary groups");

Expand Down

0 comments on commit d4af53f

Please sign in to comment.