mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-13 01:50:00 -04:00
Log a warning when catz is told to modify a zone not added by catz
Catz logs a warning message when it is told to modify a zone which was not added by the current catalog zone. When logging a warning, distinguish the two cases when the zone was not added by a catalog zone at all, and when the zone was added by a different catalog zone.
This commit is contained in:
parent
e861224cf4
commit
d29e5f197b
1 changed files with 17 additions and 1 deletions
|
|
@ -2689,6 +2689,8 @@ catz_addmodzone_taskaction(isc_task_t *task, isc_event_t *event0) {
|
|||
isc_result_totext(result), nameb);
|
||||
goto cleanup;
|
||||
} else {
|
||||
dns_catz_zone_t *parentcatz;
|
||||
|
||||
if (!dns_zone_getadded(zone)) {
|
||||
isc_log_write(
|
||||
named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
|
|
@ -2700,7 +2702,20 @@ catz_addmodzone_taskaction(isc_task_t *task, isc_event_t *event0) {
|
|||
nameb);
|
||||
goto cleanup;
|
||||
}
|
||||
if (dns_zone_get_parentcatz(zone) != ev->origin) {
|
||||
|
||||
parentcatz = dns_zone_get_parentcatz(zone);
|
||||
|
||||
if (parentcatz == NULL) {
|
||||
isc_log_write(
|
||||
named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
|
||||
"catz: catz_addmodzone_taskaction: "
|
||||
"zone '%s' exists and is not added by "
|
||||
"a catalog zone, so won't be modified",
|
||||
nameb);
|
||||
goto cleanup;
|
||||
}
|
||||
if (parentcatz != ev->origin) {
|
||||
isc_log_write(
|
||||
named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
|
||||
|
|
@ -2710,6 +2725,7 @@ catz_addmodzone_taskaction(isc_task_t *task, isc_event_t *event0) {
|
|||
nameb);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
dns_zone_detach(&zone);
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue