From 85f94e9dbf9ef0e23e9d1ef58ccb87bcdc40a53b Mon Sep 17 00:00:00 2001 From: Jakob Schlyter Date: Tue, 22 Mar 2005 16:38:47 +0000 Subject: ISC BIND release 9.3.1. ok deraadt@ --- usr.sbin/bind/lib/bind9/check.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'usr.sbin/bind/lib/bind9/check.c') diff --git a/usr.sbin/bind/lib/bind9/check.c b/usr.sbin/bind/lib/bind9/check.c index 486b0c91f0c..b47c4d45917 100644 --- a/usr.sbin/bind/lib/bind9/check.c +++ b/usr.sbin/bind/lib/bind9/check.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $ISC: check.c,v 1.37.6.28 2004/07/29 00:08:08 marka Exp $ */ +/* $ISC: check.c,v 1.37.6.29 2004/11/22 05:02:41 marka Exp $ */ #include @@ -732,7 +732,7 @@ check_zoneconf(cfg_obj_t *zconfig, cfg_obj_t *config, isc_symtab_t *symtab, { "zone-statistics", MASTERZONE | SLAVEZONE | STUBZONE }, { "allow-update", MASTERZONE }, { "allow-update-forwarding", SLAVEZONE }, - { "file", MASTERZONE | SLAVEZONE | STUBZONE | HINTZONE}, + { "file", MASTERZONE | SLAVEZONE | STUBZONE | HINTZONE }, { "ixfr-base", MASTERZONE | SLAVEZONE }, { "ixfr-tmp-file", MASTERZONE | SLAVEZONE }, { "masters", SLAVEZONE | STUBZONE }, @@ -943,6 +943,27 @@ check_zoneconf(cfg_obj_t *zconfig, cfg_obj_t *config, isc_symtab_t *symtab, if (tresult != ISC_R_SUCCESS) result = tresult; + /* + * If the zone type is rbt/rbt64 then master/hint zones + * require file clauses. + */ + obj = NULL; + tresult = cfg_map_get(zoptions, "database", &obj); + if (tresult == ISC_R_NOTFOUND || + (tresult == ISC_R_SUCCESS && + (strcmp("rbt", cfg_obj_asstring(obj)) == 0 || + strcmp("rbt64", cfg_obj_asstring(obj)) == 0))) { + obj = NULL; + tresult = cfg_map_get(zoptions, "file", &obj); + if (tresult != ISC_R_SUCCESS && + (ztype == MASTERZONE || ztype == HINTZONE)) { + cfg_obj_log(zconfig, logctx, ISC_LOG_ERROR, + "zone '%s': missing 'file' entry", + zname); + result = tresult; + } + } + return (result); } -- cgit v1.2.3