From f488b1c311f2fc09ae8e45f7893185e608b17ede Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 18 Jul 2003 06:00:41 +0000 Subject: [PATCH] 1487. [compat] Treat 'allow-update' on slave zones as a warning. [RT #3469] --- CHANGES | 3 +++ lib/bind9/check.c | 19 +++++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index 766a01d4d7..0a66eb61bb 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +1487. [compat] Treat 'allow-update' on slave zones as a warning. + [RT #3469] + 1488. [bug] Don't override trust levels for glue addresses. [RT #5764] diff --git a/lib/bind9/check.c b/lib/bind9/check.c index aac268a589..9e273e5096 100644 --- a/lib/bind9/check.c +++ b/lib/bind9/check.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: check.c,v 1.36 2003/03/20 00:43:08 marka Exp $ */ +/* $Id: check.c,v 1.37 2003/07/18 06:00:41 marka Exp $ */ #include @@ -586,11 +586,18 @@ check_zoneconf(cfg_obj_t *zconfig, cfg_obj_t *config, isc_symtab_t *symtab, cfg_map_get(zoptions, options[i].name, &obj) == ISC_R_SUCCESS) { - cfg_obj_log(obj, logctx, ISC_LOG_ERROR, - "option '%s' is not allowed in '%s' " - "zone '%s'", - options[i].name, typestr, zname); - result = ISC_R_FAILURE; + if (strcmp(options[i].name, "allow-update") != 0 || + ztype != SLAVEZONE) { + cfg_obj_log(obj, logctx, ISC_LOG_ERROR, + "option '%s' is not allowed " + "in '%s' zone '%s'", + options[i].name, typestr, zname); + result = ISC_R_FAILURE; + } else + cfg_obj_log(obj, logctx, ISC_LOG_WARNING, + "option '%s' is not allowed " + "in '%s' zone '%s'", + options[i].name, typestr, zname); } }