From: Martin Vopatek Date: Wed, 29 May 2024 12:14:09 +0000 (+0200) Subject: Only check old pid if no username X-Git-Tag: release-1.21.0rc1~67^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1078%2Fhead;p=thirdparty%2Funbound.git Only check old pid if no username Do as the comment says and only check old pid if there is no username configured. --- diff --git a/daemon/unbound.c b/daemon/unbound.c index d6c371571..64d4236d3 100644 --- a/daemon/unbound.c +++ b/daemon/unbound.c @@ -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