From efe34b8ddbecf45d1671efbcba30bdb75410c98a Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 18 Jul 2008 01:26:20 +0000 Subject: [PATCH] 2389 [bug] Move the working directory writable to after the ns_os_changeuser() call. [RT #18326] --- CHANGES | 3 +++ bin/named/server.c | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/CHANGES b/CHANGES index f4af6fc407..0decf963bf 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +2389 [bug] Move the working directory writable to after the + ns_os_changeuser() call. [RT #18326] + 2388. [bug] Avoid using tables for layout purposes in statistics XSL [RT #18159]. diff --git a/bin/named/server.c b/bin/named/server.c index 33b4c21746..4974a46f02 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: server.c,v 1.512 2008/07/12 05:58:08 jinmei Exp $ */ +/* $Id: server.c,v 1.513 2008/07/18 01:26:20 marka Exp $ */ /*! \file */ @@ -2965,15 +2965,6 @@ load_configuration(const char *filename, ns_server_t *server, } CHECK(result); - /* - * Check that the working directory is writable. - */ - if (access(".", W_OK) != 0) { - isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, - NS_LOGMODULE_SERVER, ISC_LOG_ERROR, - "the working directory is not writable"); - } - /* * Check the validity of the configuration. */ @@ -3411,6 +3402,15 @@ load_configuration(const char *filename, ns_server_t *server, if (first_time) ns_os_changeuser(); + /* + * Check that the working directory is writable. + */ + if (access(".", W_OK) != 0) { + isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, + NS_LOGMODULE_SERVER, ISC_LOG_ERROR, + "the working directory is not writable"); + } + /* * Configure the logging system. *