]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Sysdep: Drop supplementary groups when dropping GID
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Wed, 21 Aug 2019 15:30:00 +0000 (17:30 +0200)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Wed, 21 Aug 2019 15:30:00 +0000 (17:30 +0200)
We forgot to do that. Oops.

sysdep/unix/main.c

index 05becbe75f6a57c84c69b84aa92803458db44225..db848033771e1c4ecb39874cc6fec0acb34c2cc6 100644 (file)
@@ -83,6 +83,9 @@ drop_gid(gid_t gid)
 {
   if (setgid(gid) < 0)
     die("setgid: %m");
+
+  if (setgroups(0, NULL) < 0)
+    die("setgroups: %m");
 }
 
 /*