diff options
Diffstat (limited to 'python/runner/sandbox.c')
-rw-r--r-- | python/runner/sandbox.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python/runner/sandbox.c b/python/runner/sandbox.c index 12e2720..4576060 100644 --- a/python/runner/sandbox.c +++ b/python/runner/sandbox.c @@ -22,10 +22,10 @@ int main(int argc, char* argv[]) return 1; } int ret = 0; - if ((ret = setuid(pw->pw_uid)) != 0) - fprintf(stderr, "setuid returned %d\n", ret); if ((ret = setgid(pw->pw_gid)) != 0) fprintf(stderr, "setgid returned %d\n", ret); + if ((ret = setuid(pw->pw_uid)) != 0) + fprintf(stderr, "setuid returned %d\n", ret); // limit CPU time to 1 second struct rlimit const cpu_limit = { .rlim_cur = 1, .rlim_max = 1 }; |