diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-08-21 17:30:00 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-08-21 17:30:00 +0200 |
commit | 5ab3447de18235de566eb5116c0aec24050f5f85 (patch) | |
tree | 2bf46101e4202f401a2102cdc416cf18565dba69 /sysdep/unix/main.c | |
parent | 4fa0e472cf3e8c61a3f67e91d201dbc12ea94221 (diff) |
Sysdep: Drop supplementary groups when dropping GID
We forgot to do that. Oops.
Diffstat (limited to 'sysdep/unix/main.c')
-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 05becbe7..db848033 100644 --- a/sysdep/unix/main.c +++ b/sysdep/unix/main.c @@ -83,6 +83,9 @@ drop_gid(gid_t gid) { if (setgid(gid) < 0) die("setgid: %m"); + + if (setgroups(0, NULL) < 0) + die("setgroups: %m"); } /* |