]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2389 [bug] Move the working directory writable to after the
authorMark Andrews <marka@isc.org>
Fri, 18 Jul 2008 01:26:20 +0000 (01:26 +0000)
committerMark Andrews <marka@isc.org>
Fri, 18 Jul 2008 01:26:20 +0000 (01:26 +0000)
                        ns_os_changeuser() call. [RT #18326]

CHANGES
bin/named/server.c

diff --git a/CHANGES b/CHANGES
index f4af6fc407160e6de275be3a48b202de4dcbb4bf..0decf963bf49c5d6085825986bc00632ed20488b 100644 (file)
--- 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].
 
index 33b4c21746dc30902c0cffa2dc70bd9a13e26f95..4974a46f02ade8e5477dc3cacb54b9e6a60702e7 100644 (file)
@@ -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.
         *