From 8cf32b6bb567330ebcfab9331aa5002f58ed9e40 Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Tue, 10 Sep 2019 15:08:15 +0200 Subject: Sysdep: Drop supplementary groups when dropping GID We forgot to do that. Oops. --- sysdep/unix/main.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sysdep') 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"); } /* -- cgit v1.2.3