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

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