diff options
author | Jakob Schlyter <jakob@cvs.openbsd.org> | 2005-03-22 16:38:47 +0000 |
---|---|---|
committer | Jakob Schlyter <jakob@cvs.openbsd.org> | 2005-03-22 16:38:47 +0000 |
commit | 85f94e9dbf9ef0e23e9d1ef58ccb87bcdc40a53b (patch) | |
tree | d553994cfc646ffcd93c3c716789344a45bd64d2 /usr.sbin/bind/lib/bind9/check.c | |
parent | 12573bf60cac4c9c85122b9f2c0f2343e6d188fa (diff) |
ISC BIND release 9.3.1. ok deraadt@
Diffstat (limited to 'usr.sbin/bind/lib/bind9/check.c')
-rw-r--r-- | usr.sbin/bind/lib/bind9/check.c | 25 |
1 files changed, 23 insertions, 2 deletions
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 <config.h> @@ -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); } |