summaryrefslogtreecommitdiff
path: root/bin/named/unix/os.c
diff options
context:
space:
mode:
authorInternet Software Consortium, Inc <@isc.org>2009-06-24 15:04:37 -0600
committerLaMont Jones <lamont@debian.org>2009-06-24 15:04:37 -0600
commit2306fd1207ccddc925d7b42b9842a29db6e81e40 (patch)
treed37e2702192c823d7464236ed36aa22a3399ac6c /bin/named/unix/os.c
parent6a93ff6c448c912489acbc6f07845a90575e0996 (diff)
downloadbind9-2306fd1207ccddc925d7b42b9842a29db6e81e40.tar.gz
9.7.0a1
Diffstat (limited to 'bin/named/unix/os.c')
-rw-r--r--bin/named/unix/os.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/named/unix/os.c b/bin/named/unix/os.c
index 5e6b98f6..eb8682a4 100644
--- a/bin/named/unix/os.c
+++ b/bin/named/unix/os.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: os.c,v 1.89.12.5 2009/03/02 03:03:54 marka Exp $ */
+/* $Id: os.c,v 1.95 2009/03/02 03:08:22 marka Exp $ */
/*! \file */
@@ -695,6 +695,13 @@ mkdirpath(char *filename, void (*report)(const char *, ...)) {
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 = '/';
}