diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-09-10 15:08:15 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-09-10 15:08:15 +0200 |
commit | 8cf32b6bb567330ebcfab9331aa5002f58ed9e40 (patch) | |
tree | 5fa2ee283cd6b83070bc217e08f73c89f091575c /sysdep | |
parent | 8525d7104e9615eeebdf14d20eb376ccda86c937 (diff) |
Sysdep: Drop supplementary groups when dropping GID
We forgot to do that. Oops.
Diffstat (limited to 'sysdep')
-rw-r--r-- | sysdep/unix/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c index 99cfab17..01c0dedb 100644 --- a/sysdep/unix/main.c +++ b/sysdep/unix/main.c @@ -87,6 +87,9 @@ drop_gid(gid_t gid) { if (setgid(gid) < 0) die("setgid: %m"); + + if (setgroups(0, NULL) < 0) + die("setgroups: %m"); } /* |