Commit Diff
Diff:
46d43dc09c82e05762ec05585eed65ba953e6887
e009ccbe66f67a4c5344d6a1f415c50b699765ad
Commit:
e009ccbe66f67a4c5344d6a1f415c50b699765ad
Tree:
032f0911872788c332859993e0bc6f002f16bc47
Author:
Florian Westphal <fw@strlen.de>
Committer:
Florian Westphal <fw@strlen.de>
Date:
Mon Aug 26 22:19:31 2013 UTC
Message:
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
blob - e075e0a7355486c826497bd602cd64be7b1990ab
blob + 4099719b8ebe703e66960c97ae999df1f3274043
--- src/ngircd/ngircd.c
+++ src/ngircd/ngircd.c
@@ -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
IRCNow