(bsc#859298). OBS-URL: https://build.opensuse.org/package/show/network/dnsmasq?expand=0&rev=81
17 lines
538 B
Diff
17 lines
538 B
Diff
--- src/dnsmasq.c.orig
|
|
+++ src/dnsmasq.c
|
|
@@ -557,11 +557,10 @@ int main (int argc, char **argv)
|
|
if (!option_bool(OPT_DEBUG) && getuid() == 0)
|
|
{
|
|
int bad_capabilities = 0;
|
|
- gid_t dummy;
|
|
|
|
- /* remove all supplimentary groups */
|
|
+ /* set the supplimentary 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);
|