]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Sysdep: Drop supplementary groups when dropping GID
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Tue, 10 Sep 2019 13:08:15 +0000 (15:08 +0200)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Tue, 10 Sep 2019 13:08:15 +0000 (15:08 +0200)
We forgot to do that. Oops.

sysdep/unix/main.c

index 99cfab17e64fdff0c299d3c1fc9cccd1d96e5aff..01c0dedb627233582ea42c4625180f44022479ae 100644 (file)
@@ -87,6 +87,9 @@ drop_gid(gid_t gid)
 {
   if (setgid(gid) < 0)
     die("setgid: %m");
+
+  if (setgroups(0, NULL) < 0)
+    die("setgroups: %m");
 }
 
 /*