]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Only check old pid if no username 1078/head
authorMartin Vopatek <vopatek@ingate.com>
Wed, 29 May 2024 12:14:09 +0000 (14:14 +0200)
committerMartin Vopatek <vopatek@ingate.com>
Wed, 29 May 2024 12:16:18 +0000 (14:16 +0200)
Do as the comment says and only check old pid if there is no username
configured.

daemon/unbound.c

index d6c371571d75ce01d3f146f1bf7c8af9a0fd5185..64d4236d37276c5ba9c403d59241d1314b7019f5 100644 (file)
@@ -550,7 +550,7 @@ perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode,
                 * because that creates privilege escape problems, with the
                 * pidfile writable by unprivileged users, but used by
                 * privileged users. */
-               if(cfg->username && cfg->username[0])
+               if(!(cfg->username && cfg->username[0]))
                        checkoldpid(daemon->pidfile, pidinchroot);
        }
 #endif