From 8ff1baf585b569914f7762b7839af0bb00334b03 Mon Sep 17 00:00:00 2001 From: Martin Vopatek Date: Wed, 29 May 2024 14:14:09 +0200 Subject: [PATCH] Only check old pid if no username Do as the comment says and only check old pid if there is no username configured. --- daemon/unbound.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.47.2