Rebuilt for BIND 9.18.13 (#2178717)

Remove rpz_attach function not used on BIND 9.16+. It referenced
db_registered parameter removed in this bind release.
This commit is contained in:
Petr Menšík 2023-03-22 16:55:13 +01:00
parent e2abed6654
commit 35a1dbe9f0
2 changed files with 61 additions and 1 deletions

View File

@ -0,0 +1,56 @@
From 5d9a012e07578d1a813b385224ba53f77f06b026 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
Date: Wed, 22 Mar 2023 13:38:18 +0100
Subject: [PATCH] Remove rpz_attach for BIND 9.16+
rpz_attach is never supplied from BIND9 code both in 9.16 or 9.18.
Remove our custom function and pass NULL as well. It would be never
called anyway.
Modified to directly remove the function without db_registered fix.
---
src/ldap_driver.c | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)
diff --git a/src/ldap_driver.c b/src/ldap_driver.c
index e4aeeb2..20e12fc 100644
--- a/src/ldap_driver.c
+++ b/src/ldap_driver.c
@@ -804,22 +804,6 @@ rpz_attach(dns_db_t *db, dns_rpz_zones_t *rpzs, uint8_t rpz_num)
dns_db_rpz_attach(ldapdb->rbtdb, rpzs, rpz_num);
}
-#else
-void
-rpz_attach(dns_db_t *db, void *void_rpzs, uint8_t rpz_num)
-{
- ldapdb_t *ldapdb = (ldapdb_t *) db;
- dns_rpz_zones_t *rpzs = (dns_rpz_zones_t *) void_rpzs;
- isc_result_t result;
-
- REQUIRE(VALID_LDAPDB(ldapdb));
-
- rpzs->zones[rpz_num]->db_registered = true;
- result = dns_db_updatenotify_register(ldapdb->rbtdb,
- dns_rpz_dbupdate_callback,
- rpzs->zones[rpz_num]);
- REQUIRE(result == ISC_R_SUCCESS);
-}
#endif
/*
@@ -966,7 +950,11 @@ static dns_dbmethods_t ldapdb_methods = {
resigned,
isdnssec,
getrrsetstats,
+#if LIBDNS_VERSION_MAJOR < 1600
rpz_attach,
+#else
+ NULL,
+#endif
NULL, /* rpz_ready */
findnodeext,
findext,
--
2.39.2

View File

@ -12,7 +12,7 @@
Name: bind-dyndb-ldap
Version: 11.10
Release: 13%{?dist}
Release: 14%{?dist}
Summary: LDAP back-end plug-in for BIND
License: GPLv2+
@ -28,6 +28,7 @@ Patch2: bind-dyndb-ldap-bind-9.18.10-logs.patch
# https://pagure.io/bind-dyndb-ldap/c/5dd2fefa0bc7cd7689004cec64304c3a02be9eab
Patch3: bind-dyndb-ldap-bind-9.18.10-staleok.patch
Patch4: bind-dyndb-ldap-11.10-bind-9.18.11.patch
Patch5: bind-dyndb-ldap-11.10-bind-9.18.13.patch
BuildRequires: bind-devel >= %{bind_version}, bind-lite-devel >= %{bind_version}
BuildRequires: krb5-devel
@ -126,6 +127,9 @@ sed -i.bak -e "$SEDSCRIPT" /etc/named.conf
%changelog
* Wed Mar 22 2023 Petr Menšík <pemensik@redhat.com> - 11.10-14
- Rebuilt for BIND 9.18.13 (#2178717)
* Mon Feb 20 2023 Petr Menšík <pemensik@redhat.com> - 11.10-13
- Rebuilt for BIND 9.18.12 (#2170096)