- windows port fixes, no AF_LOCAL, no chown, no chmod(grp).

git-svn-id: file:///svn/unbound/trunk@3319 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards
2015-01-23 15:23:58 +00:00
parent b1d79cb0ab
commit 79044dc6cf
8 changed files with 24 additions and 4 deletions
+3 -1
View File
@@ -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