]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
don't overwrite the dns_master_loadfile() result before calling zone_postload()
authorEvan Hunt <each@isc.org>
Wed, 26 Jun 2019 00:53:32 +0000 (17:53 -0700)
committerEvan Hunt <each@isc.org>
Wed, 26 Jun 2019 15:26:32 +0000 (08:26 -0700)
if "rndc reload" fails, the result code is supposed to be passed to
zone_postload, but for inline-signing zones, the result can be
overwritten first by a call to the ZONE_TRYLOCK macro. this can lead
to the partially-loaded unsigned zone being synced over to the signed
zone instead of being rejected.

lib/dns/zone.c

index d97491c61fcda59dce72eb91ab5565da5fa88f33..9706d9e2b28310c2796804a93211c590ba2ac92e 100644 (file)
@@ -15943,8 +15943,8 @@ zone_loaddone(void *arg, isc_result_t result) {
                LOCK_ZONE(zone->raw);
        else if (inline_raw(zone)) {
                secure = zone->secure;
-               TRYLOCK_ZONE(result, secure);
-               if (result != ISC_R_SUCCESS) {
+               TRYLOCK_ZONE(tresult, secure);
+               if (tresult != ISC_R_SUCCESS) {
                        UNLOCK_ZONE(zone);
                        secure = NULL;
                        isc_thread_yield();