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 <eldering@users.noreply.github.com>
  • Loading branch information
meisterT and eldering committed May 30, 2024
1 parent 2d42e14 commit 11403e5
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 @@ -826,7 +826,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 11403e5

Please sign in to comment.