In message <7610864823c0d04d89342623a3adc9de54c4a...@hopple.countryday.net>, "S pain, Dr. Jeffry A." writes: > For bind 9.9.3 build on Ubuntu 12.04LTS x64, I see log messages, for example, > "/etc/bind/named.conf.local:4: zone 'jaspain.biz': missing 'file' entry" for > each slave zone configured for inline signing. The file clause is, in fact, > present in the configuration file, for example: > zone "jaspain.biz" { > type slave; > file "/var/cache/bind/jaspain.biz.db"; > key-directory "/var/lib/bind/jaspain.biz"; > auto-dnssec maintain; > inline-signing yes; > masters { stealthMasters; }; > notify explicit; > also-notify { publicSlaves; }; > allow-transfer { localhost; transferees; }; > }; > > The message does not occur for a similar slave zone that does not have key-di > rectory, auto-dnssec, or inline-signing configured. The bind9 service appears > to be functioning normally despite this log message. > > The message originates from the code in /lib/bind9/check.c starting in line 1 > 798. > isc_result_t res1; > obj = NULL; > tresult = cfg_map_get(zoptions, "file", &obj); > obj = NULL; > res1 = cfg_map_get(zoptions, "inline-signing", &obj); > if ((tresult != ISC_R_SUCCESS && > (ztype == MASTERZONE || ztype == HINTZONE)) || > (ztype == SLAVEZONE && res1 == ISC_R_SUCCESS)) { > cfg_obj_log(zconfig, logctx, ISC_LOG_ERROR, > "zone '%s': missing 'file' entry", > znamestr); > result = tresult; > } > > Based on the code comments starting at line 1785, is the conditional expressi > on of the "if" statement incorrectly parenthesized? Should it be as follows? > if (tresult != ISC_R_SUCCESS && > (ztype == MASTERZONE || ztype == HINTZONE || > (ztype == SLAVEZONE && res1 == ISC_R_SUCCESS))) { > > Thanks. Jeff. > > Jeffry A. Spain, Network Administrator > Cincinnati Country Day School > > _______________________________________________ > Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe > from this list > > bind-users mailing list > bind-users@lists.isc.org > https://lists.isc.org/mailman/listinfo/bind-users
The brackets were wrong and we should have checked that obj was true. Mark diff --git a/lib/bind9/check.c b/lib/bind9/check.c index b5658a1..33dd163 100644 --- a/lib/bind9/check.c +++ b/lib/bind9/check.c @@ -1930,8 +1930,9 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions, obj = NULL; res1 = cfg_map_get(zoptions, "inline-signing", &obj); if ((tresult != ISC_R_SUCCESS && - (ztype == MASTERZONE || ztype == HINTZONE)) || - (ztype == SLAVEZONE && res1 == ISC_R_SUCCESS)) { + (ztype == MASTERZONE || ztype == HINTZONE || + (ztype == SLAVEZONE && res1 == ISC_R_SUCCESS && + cfg_obj_asboolean(obj))))) { cfg_obj_log(zconfig, logctx, ISC_LOG_ERROR, "zone '%s': missing 'file' entry", znamestr); -- Mark Andrews, ISC 1 Seymour St., Dundas Valley, NSW 2117, Australia PHONE: +61 2 9871 4742 INTERNET: ma...@isc.org _______________________________________________ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users