]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1837. [bug] Compile time option ISC_FACILITY was not effective
authorMark Andrews <marka@isc.org>
Fri, 20 May 2005 01:19:43 +0000 (01:19 +0000)
committerMark Andrews <marka@isc.org>
Fri, 20 May 2005 01:19:43 +0000 (01:19 +0000)
                        for 'named -u <user>'.  [RT #13714]

CHANGES
bin/named/log.c
doc/private/branches

diff --git a/CHANGES b/CHANGES
index 906c727d75835ddb5b990cdd3586ca34006eb9bf..ea4c1e16a6712ae76c488bc098fd072465babb41 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -73,7 +73,8 @@
 
 1838.  [placeholder]   rt13707
 
-1837.  [placeholder]   rt13714
+1837.  [bug]           Compile time option ISC_FACILITY was not effective
+                       for 'named -u <user>'.  [RT #13714]
 
 1836.  [cleanup]       Silence compiler warnings in hash_test.c.
 
index 3bbbc2eff5e64860fe90b14b79e74b119a7ea8b4..fb5ad506f2886e5247ed4bd5e0e87f0d742f5316 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: log.c,v 1.40 2005/04/29 00:22:27 marka Exp $ */
+/* $Id: log.c,v 1.41 2005/05/20 01:19:42 marka Exp $ */
 
 /*! \file */
 
@@ -157,6 +157,9 @@ ns_log_setdefaultchannels(isc_logconfig_t *lcfg) {
 isc_result_t
 ns_log_setsafechannels(isc_logconfig_t *lcfg) {
        isc_result_t result;
+#if ISC_FACILITY != LOG_DAEMON
+       isc_logdestination_t destination;
+#endif
 
        if (! ns_g_logstderr) {
                result = isc_log_createchannel(lcfg, "default_debug",
@@ -175,6 +178,15 @@ ns_log_setsafechannels(isc_logconfig_t *lcfg) {
                isc_log_setdebuglevel(ns_g_lctx, ns_g_debuglevel);
        }
 
+#if ISC_FACILITY != LOG_DAEMON
+       destination.facility = ISC_FACILITY;
+       result = isc_log_createchannel(lcfg, "default_syslog",
+                                      ISC_LOG_TOSYSLOG, ISC_LOG_INFO,
+                                      &destination, 0);
+       if (result != ISC_R_SUCCESS)
+               goto cleanup;
+#endif
+
        result = ISC_R_SUCCESS;
 
  cleanup:
index 19f6380fadb80b634673fb39d806947baac5a1ef..94c74fbddde32f57205ec9dafcec4dca0861a322 100644 (file)
@@ -33,7 +33,7 @@ rt13606                               open    marka   // TSIG SHA256
 rt13662                                new     
 rt13694                                new     
 rt13707                                new     
-rt13714                                new     
+rt13714                                13714   
 rt13753                                new     
 rt13754                                new     
 rt13771                                new