2024-05-03 12:06:52 +02:00
|
|
|
--- src/dnsmasq.c.orig
|
|
|
|
+++ src/dnsmasq.c
|
2024-06-14 17:13:58 +02:00
|
|
|
@@ -728,11 +728,10 @@ int main (int argc, char **argv)
|
2024-05-03 12:06:52 +02:00
|
|
|
if (!option_bool(OPT_DEBUG) && getuid() == 0)
|
|
|
|
{
|
|
|
|
int bad_capabilities = 0;
|
|
|
|
- gid_t dummy;
|
|
|
|
|
|
|
|
- /* remove all supplementary groups */
|
|
|
|
+ /* set the supplementary groups of the daemon user */
|
|
|
|
if (gp &&
|
|
|
|
- (setgroups(0, &dummy) == -1 ||
|
|
|
|
+ (initgroups(daemon->username, gp->gr_gid) == -1 ||
|
|
|
|
setgid(gp->gr_gid) == -1))
|
|
|
|
{
|
|
|
|
send_event(err_pipe[1], EVENT_GROUP_ERR, errno, daemon->groupname);
|