+2558. [func] Set the ownership of missing directories created
+ for pid-file if -u has been specified on the command
+ line. [RT #19328]
+
2557. [cleanup] PCI compliance:
* new libisc log module file
* isc_dir_chroot() now also changes the working
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: server.c,v 1.527 2009/01/30 03:48:54 marka Exp $ */
+/* $Id: server.c,v 1.528 2009/02/16 05:08:43 marka Exp $ */
/*! \file */
}
}
+ obj = NULL;
+ if (ns_config_get(maps, "pid-file", &obj) == ISC_R_SUCCESS)
+ if (cfg_obj_isvoid(obj))
+ ns_os_writepidfile(NULL, first_time);
+ else
+ ns_os_writepidfile(cfg_obj_asstring(obj), first_time);
+ else if (ns_g_lwresdonly)
+ ns_os_writepidfile(lwresd_g_defaultpidfile, first_time);
+ else
+ ns_os_writepidfile(ns_g_defaultpidfile, first_time);
+
/*
* Relinquish root privileges.
*/
}
}
- obj = NULL;
- if (ns_config_get(maps, "pid-file", &obj) == ISC_R_SUCCESS)
- if (cfg_obj_isvoid(obj))
- ns_os_writepidfile(NULL, first_time);
- else
- ns_os_writepidfile(cfg_obj_asstring(obj), first_time);
- else if (ns_g_lwresdonly)
- ns_os_writepidfile(lwresd_g_defaultpidfile, first_time);
- else
- ns_os_writepidfile(ns_g_defaultpidfile, first_time);
obj = NULL;
if (options != NULL &&
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: os.c,v 1.92 2009/02/16 02:01:15 marka Exp $ */
+/* $Id: os.c,v 1.93 2009/02/16 05:08:43 marka Exp $ */
/*! \file */
strbuf);
goto error;
}
+ if (runas_pw != NULL &&
+ chown(filename, runas_pw->pw_uid,
+ runas_pw->pw_gid) == -1) {
+ isc__strerror(errno, strbuf, sizeof(strbuf));
+ (*report)("couldn't chown '%s': %s", filename,
+ strbuf);
+ }
}
*slash = '/';
}