mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-08 23:32:05 -04:00
emulate the BIND 8 kludge of setting the query logging flag default
depending on whether a 'queries' log channel has been defined
This commit is contained in:
parent
63cef8bde8
commit
2417f18be8
1 changed files with 19 additions and 1 deletions
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: server.c,v 1.264 2000/11/30 20:47:53 gson Exp $ */
|
||||
/* $Id: server.c,v 1.265 2000/12/01 02:01:26 gson Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
|
@ -1753,6 +1753,24 @@ load_configuration(const char *filename, ns_server_t *server,
|
|||
"config file");
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the default value of the query logging flag depending
|
||||
* whether a "queries" category has been defined. This is
|
||||
* a disgusting hack, but we need to do this for BIND 8
|
||||
* compatibility.
|
||||
*/
|
||||
if (first_time) {
|
||||
dns_c_logginglist_t *clog = NULL;
|
||||
dns_c_logcat_t *ccat;
|
||||
(void)dns_c_ctx_getlogging(cctx, &clog);
|
||||
for (ccat = ISC_LIST_HEAD(clog->categories);
|
||||
ccat != NULL;
|
||||
ccat = ISC_LIST_NEXT(ccat, next)) {
|
||||
if (strcmp(ccat->catname, "queries") == 0)
|
||||
server->log_queries = ISC_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (dns_c_ctx_getpidfilename(cctx, &pidfilename) != ISC_R_NOTFOUND)
|
||||
ns_os_writepidfile(pidfilename);
|
||||
else if (ns_g_lwresdonly)
|
||||
|
|
|
|||
Loading…
Reference in a new issue