1837. [bug] Compile time option ISC_FACILITY was not effective

for 'named -u <user>'.  [RT #13714]
This commit is contained in:
Mark Andrews
2005-05-20 01:21:44 +00:00
parent 1da3399320
commit 12d509846c
2 changed files with 16 additions and 1 deletions

View File

@@ -61,6 +61,9 @@
1839. [bug] <isc/hash.h> was not being installed.
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.
1835. [bug] Update dnssec-signzone's usage message. [RT #13657]

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: log.c,v 1.37.18.3 2005/04/29 00:15:22 marka Exp $ */
/* $Id: log.c,v 1.37.18.4 2005/05/20 01:21:44 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: