]> arthur.barton.de Git - ngircd.git/blobdiff - src/ngircd/ngircd.c
Ignore "operation not permitted" while dropping groups
[ngircd.git] / src / ngircd / ngircd.c
index e075e0a7355486c826497bd602cd64be7b1990ab..e26ac3bd652cf18b2067b4c47e1eb0ad7172ee72 100644 (file)
@@ -724,6 +724,13 @@ NGIRCd_Init(bool NGIRCd_NoDaemon)
                        if (real_errno != EPERM) 
                                goto out;
                }
+               if (setgroups(0, NULL) != 0) {
+                       real_errno = errno;
+                       Log(LOG_ERR, "Can't drop supplementary group IDs: %s!",
+                                       strerror(errno));
+                       if (real_errno != EPERM)
+                               goto out;
+               }
        }
 #endif