1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-12-13 02:10:27 +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:
Florian Westphal 2013-08-27 00:19:31 +02:00
parent 46d43dc09c
commit e009ccbe66

View File

@ -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