]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Don't try to run daemon_privileged on reload.
authorChristopher Zimmermann <madroach@gmerlin.de>
Tue, 14 Jan 2020 22:45:21 +0000 (23:45 +0100)
committerChristopher Zimmermann <madroach@gmerlin.de>
Sun, 10 May 2020 20:30:25 +0000 (22:30 +0200)
daemon/unbound.c

index 32604728d32050c4a67b5fb85302eae1d41f2561..358d57bf1fdbcd6ce1bb85c47790c36648d4292c 100644 (file)
@@ -668,9 +668,9 @@ run_daemon(const char* cfgfile, int cmdline_verbose, int debug_mode, int need_pi
                        config_lookup_uid(cfg);
        
                /* prepare */
-               if(!daemon_privileged(daemon))
-                       fatal_exit("could not do privileged setup");
                if(!done_setup) { 
+                       if(!daemon_privileged(daemon))
+                               fatal_exit("could not do privileged setup");
                        perform_setup(daemon, cfg, debug_mode, &cfgfile, need_pidfile);
                        done_setup = 1; 
                } else {