diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2015-04-26 11:23:26 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2015-04-26 11:23:26 +0000 |
commit | d3348d437fb0408bc24892ebd0b035686c294705 (patch) | |
tree | 01c1d94467622a175fad10cd34a2f6f05d32c1b7 /daemon/unbound.c | |
parent | 54dd3272da3f4a5fda7dd6ac359b7cf68e21a796 (diff) |
Diffstat (limited to 'daemon/unbound.c')
-rw-r--r-- | daemon/unbound.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/daemon/unbound.c b/daemon/unbound.c index a31b0392ffdb2..f6bd924a57b9f 100644 --- a/daemon/unbound.c +++ b/daemon/unbound.c @@ -504,16 +504,18 @@ perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode, if(cfg->pidfile && cfg->pidfile[0]) { writepid(daemon->pidfile, getpid()); if(cfg->username && cfg->username[0]) { +# ifdef HAVE_CHOWN if(chown(daemon->pidfile, cfg->uid, cfg->gid) == -1) { log_err("cannot chown %u.%u %s: %s", (unsigned)cfg->uid, (unsigned)cfg->gid, daemon->pidfile, strerror(errno)); } +# endif /* HAVE_CHOWN */ } } #else (void)daemon; -#endif +#endif /* HAVE_KILL */ /* Set user context */ #ifdef HAVE_GETPWNAM |