Blame SOURCES/0001-Modify-empty-zone-conflicts-under-exclusive-mode_rhbz#2129844.patch

fc0930
From 7b4c1e28b3e64f7cd075599472e349510f8d33da Mon Sep 17 00:00:00 2001
fc0930
From: Petr Menšík <pemensik@redhat.com>
fc0930
Date: Sep 14 2022 15:23:20 +0000
fc0930
Subject: Modify empty zone conflicts under exclusive mode
fc0930
fc0930
fc0930
Does not accept new request when exclusive mode is active. Zone table
fc0930
can be modified even after main fwd entries have been added. Ensure
fc0930
empty zones handling keeps exclusive mode active.
fc0930
fc0930
Exclusive mode were mentioned as the only protection it had by bind
fc0930
maintainer:
fc0930
https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/6637#note_308928
fc0930
fc0930
---
fc0930
fc0930
diff --git a/src/fwd.c b/src/fwd.c
fc0930
index 24f6e53..0a3c673 100644
fc0930
--- a/src/fwd.c
fc0930
+++ b/src/fwd.c
fc0930
@@ -595,10 +595,12 @@ fwd_configure_zone(const settings_set_t *set, ldap_instance_t *inst,
fc0930
 		  dns_result_totext(result));
fc0930
 
fc0930
 	/* Handle collisions with automatic empty zones. */
fc0930
-	if (isconfigured == true)
fc0930
+	if (isconfigured == true) {
fc0930
+		run_exclusive_enter(inst, &lock_state);
fc0930
 		CHECK(empty_zone_handle_conflicts(name,
fc0930
 						  view->zonetable,
fc0930
 						  (fwdpolicy == dns_fwdpolicy_first)));
fc0930
+	}
fc0930
 
fc0930
 cleanup:
fc0930
 	run_exclusive_exit(inst, lock_state);
fc0930