1135. [func] You can now override the default syslog() facility for
named/lwresd at compile time. [RT #1982]
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -1,3 +1,6 @@
|
||||
1135. [func] You can now override the default syslog() facility for
|
||||
named/lwresd at compile time. [RT #1982]
|
||||
|
||||
1134. [bug] Multithreaded servers could deadlock in ferror()
|
||||
when reloading zone files. [RT #1951, #1998]
|
||||
|
||||
|
||||
4
README
4
README
@@ -193,6 +193,10 @@ Building
|
||||
Any additional preprocessor symbols you want defined.
|
||||
Defaults to empty string.
|
||||
|
||||
Possible settings:
|
||||
Change the default syslog facility of named/lwresd.
|
||||
e.g. -DISC_FACILITY=LOG_LOCAL0
|
||||
|
||||
To build shared libraries, specify "--with-libtool" on the
|
||||
configure command line.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: log.c,v 1.34 2001/10/31 17:42:04 gson Exp $ */
|
||||
/* $Id: log.c,v 1.35 2001/11/23 01:15:06 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
|
||||
#include <named/log.h>
|
||||
|
||||
#ifndef ISC_FACILITY
|
||||
#define ISC_FACILITY LOG_DAEMON
|
||||
#endif
|
||||
|
||||
/*
|
||||
* When adding a new category, be sure to add the appropriate
|
||||
* #define to <named/log.h>.
|
||||
@@ -126,6 +130,15 @@ ns_log_setdefaultchannels(isc_logconfig_t *lcfg) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
#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
|
||||
|
||||
/*
|
||||
* Set the initial debug level.
|
||||
*/
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: os.c,v 1.54 2001/10/16 20:04:38 gson Exp $ */
|
||||
/* $Id: os.c,v 1.55 2001/11/23 01:15:07 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
#include <stdarg.h>
|
||||
@@ -44,6 +44,10 @@
|
||||
|
||||
static char *pidfile = NULL;
|
||||
|
||||
#ifndef ISC_FACILITY
|
||||
#define ISC_FACILITY LOG_DAEMON
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If there's no <linux/capability.h>, we don't care about <sys/prctl.h>
|
||||
*/
|
||||
@@ -268,7 +272,7 @@ setup_syslog(const char *progname) {
|
||||
options |= LOG_NDELAY;
|
||||
#endif
|
||||
|
||||
openlog(isc_file_basename(progname), options, LOG_DAEMON);
|
||||
openlog(isc_file_basename(progname), options, ISC_FACILITY);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user