aboutgitcodebugslistschat
diff options
context:
space:
mode:
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index 9b87b65..7e10deb 100644
--- a/util.c
+++ b/util.c
@@ -525,7 +525,7 @@ void check_root(struct ctx *c)
#endif
}
- if (!setgid(c->gid) && !setuid(c->uid))
+ if (!setgroups(0, NULL) && !setgid(c->gid) && !setuid(c->uid))
return;
fprintf(stderr, "Can't change user/group, exiting");