diff --git a/CHANGES b/CHANGES index 011ea826ce..74928635c5 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,8 @@ + 278. [bug] bin/named/logconf.c:category_fromconf() didn't take + note of when isc_log_categorybyname() wasn't able + to find the category name and would then apply the + channel list of the unknown category to all categories. + 277. [bug] isc_log_categorybyname() and isc_log_modulebyname() would fail to find the first member of any category or module array apart from the internal defaults. diff --git a/bin/named/logconf.c b/bin/named/logconf.c index c27b47d7ed..5b80f058d6 100644 --- a/bin/named/logconf.c +++ b/bin/named/logconf.c @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: logconf.c,v 1.21 2000/06/22 22:30:12 tale Exp $ */ +/* $Id: logconf.c,v 1.22 2000/06/23 17:59:08 tale Exp $ */ #include @@ -41,8 +41,29 @@ category_fromconf(dns_c_logcat_t *ccat, isc_logconfig_t *lctx) { isc_logmodule_t *module; category = isc_log_categorybyname(ns_g_lctx, ccat->catname); + if (category == NULL) { + isc_log_write(ns_g_lctx, DNS_LOGCATEGORY_CONFIG, + NS_LOGMODULE_SERVER, ISC_LOG_ERROR, + "unknown logging category '%s' ignored", + ccat->catname); + /* + * Allow further processing by returning success. + */ + return (ISC_R_SUCCESS); + } + #ifdef notyet module = isc_log_modulebyname(ns_g_lctx, ccat->modname); + if (module == NULL) { + isc_log_write(ns_g_lctx, DNS_LOGCATEGORY_CONFIG, + NS_LOGMODULE_SERVER, ISC_LOG_ERROR, + "unknown logging module '%s' ignored", + ccat->modname); + /* + * Allow further processing by returning success. + */ + return (ISC_R_SUCCESS); + } #else module = NULL; #endif