mirror of
https://github.com/osmarks/ngircd.git
synced 2025-09-23 04:34:03 +00:00
ngircd: discard supplementary group ids on startup
The intention was to switch to JUST uid:gid, but setgid is not sufficient. Reported-by: Michael Scherer <misc@zarb.org>
This commit is contained in:
@@ -724,6 +724,11 @@ NGIRCd_Init(bool NGIRCd_NoDaemon)
|
||||
if (real_errno != EPERM)
|
||||
goto out;
|
||||
}
|
||||
if (setgroups(0, NULL) != 0) {
|
||||
Log(LOG_ERR, "Can't drop supplementary group ids: %s!",
|
||||
strerror(errno));
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user