diff --git a/daemon/unbound.c b/daemon/unbound.c index 32604728d..358d57bf1 100644 --- a/daemon/unbound.c +++ b/daemon/unbound.c @@ -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 {