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:
parent
46d43dc09c
commit
e009ccbe66
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user