The Samba-Bugzilla – Attachment 12606 Details for
Bug 12366
Samba DLZ_BIND module does not support BIND 9.11.x
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patches for v4-4
BZ12366-v4-4.patch (text/plain), 8.98 KB, created by
Amitay Isaacs
on 2016-10-28 05:04:12 UTC
(
hide
)
Description:
Patches for v4-4
Filename:
MIME Type:
Creator:
Amitay Isaacs
Created:
2016-10-28 05:04:12 UTC
Size:
8.98 KB
patch
obsolete
>From 4c59d52dc7dfc82b4a2389bb2e4c03289edfc679 Mon Sep 17 00:00:00 2001 >From: Amitay Isaacs <amitay@gmail.com> >Date: Tue, 27 Sep 2016 00:52:53 +1000 >Subject: [PATCH 1/5] dlz-bind: Fix preprocessor checks for BIND versions > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=12366 > >Signed-off-by: Amitay Isaacs <amitay@gmail.com> >Reviewed-by: Jeremy Allison <jra@samba.org> >(cherry picked from commit fbafd2699b03902cbb7e5131ed7d345190798392) >--- > source4/dns_server/dlz_minimal.h | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > >diff --git a/source4/dns_server/dlz_minimal.h b/source4/dns_server/dlz_minimal.h >index 11187f7..64e9863 100644 >--- a/source4/dns_server/dlz_minimal.h >+++ b/source4/dns_server/dlz_minimal.h >@@ -23,15 +23,15 @@ > #ifndef DLZ_MINIMAL_H > #define DLZ_MINIMAL_H 1 > >-#ifdef BIND_VERSION_9_8 >-#define DLZ_DLOPEN_VERSION 1 >-#elif BIND_VERSION_9_9 >-#define DLZ_DLOPEN_VERSION 2 >-#elif BIND_VERSION_9_10 >-#define DLZ_DLOPEN_VERSION 3 >-#define DLZ_DLOPEN_AGE 0 >+#if defined (BIND_VERSION_9_8) >+# define DLZ_DLOPEN_VERSION 1 >+#elif defined (BIND_VERSION_9_9) >+# define DLZ_DLOPEN_VERSION 2 >+#elif defined (BIND_VERSION_9_10) >+# define DLZ_DLOPEN_VERSION 3 >+# define DLZ_DLOPEN_AGE 0 > #else >-#error Unsupported BIND version >+# error Unsupported BIND version > #endif > > typedef unsigned int isc_result_t; >-- >2.7.4 > > >From 04fe19c653793f11651b463234fc2cb457e28400 Mon Sep 17 00:00:00 2001 >From: Amitay Isaacs <amitay@gmail.com> >Date: Tue, 27 Sep 2016 00:57:00 +1000 >Subject: [PATCH 2/5] dlz-bind: Fix initialization of DLZ_DLOPEN_AGE > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=12366 > >Signed-off-by: Amitay Isaacs <amitay@gmail.com> >Reviewed-by: Jeremy Allison <jra@samba.org> >(cherry picked from commit 370d6baaa60ca7aacab85852622cdca8bdb06d34) >--- > source4/dns_server/dlz_minimal.h | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/source4/dns_server/dlz_minimal.h b/source4/dns_server/dlz_minimal.h >index 64e9863..c1ad65b 100644 >--- a/source4/dns_server/dlz_minimal.h >+++ b/source4/dns_server/dlz_minimal.h >@@ -29,11 +29,14 @@ > # define DLZ_DLOPEN_VERSION 2 > #elif defined (BIND_VERSION_9_10) > # define DLZ_DLOPEN_VERSION 3 >-# define DLZ_DLOPEN_AGE 0 > #else > # error Unsupported BIND version > #endif > >+#if DLZ_DLOPEN_VERSION > 1 >+# define DLZ_DLOPEN_AGE 0 >+#endif >+ > typedef unsigned int isc_result_t; > #if DLZ_DLOPEN_VERSION == 1 > typedef bool isc_boolean_t; >-- >2.7.4 > > >From 38d4ae92746658786a1e13f39f206e158334ebdc Mon Sep 17 00:00:00 2001 >From: Amitay Isaacs <amitay@gmail.com> >Date: Tue, 27 Sep 2016 01:00:34 +1000 >Subject: [PATCH 3/5] dlz-bind: Set DNS_CLIENTINFO_VERSION based on BIND > version > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=12366 > >Signed-off-by: Amitay Isaacs <amitay@gmail.com> >Reviewed-by: Jeremy Allison <jra@samba.org> >(cherry picked from commit e63e51a2cfd89c5bb2c16b2521ffce864ca5b373) >--- > source4/dns_server/dlz_minimal.h | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > >diff --git a/source4/dns_server/dlz_minimal.h b/source4/dns_server/dlz_minimal.h >index c1ad65b..7c2163d 100644 >--- a/source4/dns_server/dlz_minimal.h >+++ b/source4/dns_server/dlz_minimal.h >@@ -27,8 +27,10 @@ > # define DLZ_DLOPEN_VERSION 1 > #elif defined (BIND_VERSION_9_9) > # define DLZ_DLOPEN_VERSION 2 >+# define DNS_CLIENTINFO_VERSION 1 > #elif defined (BIND_VERSION_9_10) > # define DLZ_DLOPEN_VERSION 3 >+# define DNS_CLIENTINFO_VERSION 1 > #else > # error Unsupported BIND version > #endif >@@ -97,7 +99,8 @@ typedef struct isc_sockaddr { > void * link; > } isc_sockaddr_t; > >-#define DNS_CLIENTINFO_VERSION 1 >+#if DNS_CLIENTINFO_VERSION == 1 >+ > typedef struct dns_clientinfo { > uint16_t version; > void *data; >@@ -114,6 +117,9 @@ typedef struct dns_clientinfomethods { > uint16_t age; > dns_clientinfo_sourceip_t sourceip; > } dns_clientinfomethods_t; >+ >+#endif /* DNS_CLIENTINFO_VERSION */ >+ > #endif /* DLZ_DLOPEN_VERSION > 1 */ > > /* >-- >2.7.4 > > >From a47e1ba381a7fefaed9c7752e3e7ed04f0be35d3 Mon Sep 17 00:00:00 2001 >From: Amitay Isaacs <amitay@gmail.com> >Date: Tue, 27 Sep 2016 00:51:03 +1000 >Subject: [PATCH 4/5] dlz-bind: Add support for BIND 9.11.x > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=12366 > >Signed-off-by: Amitay Isaacs <amitay@gmail.com> >Reviewed-by: Jeremy Allison <jra@samba.org> >(cherry picked from commit c8c330d5f4921aaca803b9ff571aacb0dde0c7bc) >--- > source4/dns_server/dlz_minimal.h | 27 +++++++++++++++++++++++++++ > source4/dns_server/wscript_build | 10 ++++++++++ > 2 files changed, 37 insertions(+) > >diff --git a/source4/dns_server/dlz_minimal.h b/source4/dns_server/dlz_minimal.h >index 7c2163d..89ada7a 100644 >--- a/source4/dns_server/dlz_minimal.h >+++ b/source4/dns_server/dlz_minimal.h >@@ -31,6 +31,9 @@ > #elif defined (BIND_VERSION_9_10) > # define DLZ_DLOPEN_VERSION 3 > # define DNS_CLIENTINFO_VERSION 1 >+#elif defined (BIND_VERSION_9_11) >+# define DLZ_DLOPEN_VERSION 3 >+# define DNS_CLIENTINFO_VERSION 2 > #else > # error Unsupported BIND version > #endif >@@ -118,6 +121,30 @@ typedef struct dns_clientinfomethods { > dns_clientinfo_sourceip_t sourceip; > } dns_clientinfomethods_t; > >+#elif DNS_CLIENTINFO_VERSION == 2 >+ >+typedef struct dns_clientinfo { >+ uint16_t version; >+ void *data; >+ void *dbversion; >+} dns_clientinfo_t; >+ >+typedef isc_result_t (*dns_clientinfo_sourceip_t)(dns_clientinfo_t *client, >+ isc_sockaddr_t **addrp); >+ >+typedef isc_result_t (*dns_clientinfo_version_t)(dns_clientinfo_t *client, >+ void **addrp); >+ >+#define DNS_CLIENTINFOMETHODS_VERSION 2 >+#define DNS_CLIENTINFOMETHODS_AGE 1 >+ >+typedef struct dns_clientinfomethods { >+ uint16_t version; >+ uint16_t age; >+ dns_clientinfo_sourceip_t sourceip; >+ dns_clientinfo_version_t dbversion; >+} dns_clientinfomethods_t; >+ > #endif /* DNS_CLIENTINFO_VERSION */ > > #endif /* DLZ_DLOPEN_VERSION > 1 */ >diff --git a/source4/dns_server/wscript_build b/source4/dns_server/wscript_build >index 75f3499..396ed76 100644 >--- a/source4/dns_server/wscript_build >+++ b/source4/dns_server/wscript_build >@@ -47,6 +47,16 @@ bld.SAMBA_LIBRARY('dlz_bind9_10', > deps='samba-hostconfig samdb-common gensec popt dnsserver_common', > enabled=bld.AD_DC_BUILD_IS_ENABLED()) > >+bld.SAMBA_LIBRARY('dlz_bind9_11', >+ source='dlz_bind9.c', >+ cflags='-DBIND_VERSION_9_11', >+ private_library=True, >+ link_name='modules/bind9/dlz_bind9_11.so', >+ realname='dlz_bind9_11.so', >+ install_path='${MODULESDIR}/bind9', >+ deps='samba-hostconfig samdb-common gensec popt dnsserver_common', >+ enabled=bld.AD_DC_BUILD_IS_ENABLED()) >+ > bld.SAMBA_LIBRARY('dlz_bind9_for_torture', > source='dlz_bind9.c', > cflags='-DBIND_VERSION_9_8', >-- >2.7.4 > > >From 6e7e59209813b65bc861424ba0e9aaf6de818993 Mon Sep 17 00:00:00 2001 >From: Amitay Isaacs <amitay@gmail.com> >Date: Tue, 27 Sep 2016 00:51:03 +1000 >Subject: [PATCH 5/5] provision: Add support for BIND 9.11.x > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=12366 > >Signed-off-by: Amitay Isaacs <amitay@gmail.com> >Reviewed-by: Jeremy Allison <jra@samba.org> > >Autobuild-User(master): Jeremy Allison <jra@samba.org> >Autobuild-Date(master): Fri Oct 28 03:42:25 CEST 2016 on sn-devel-144 > >(cherry picked from commit 2959c8888d46902e140963ed4190d23a7609b8da) >--- > python/samba/provision/sambadns.py | 6 +++++- > source4/setup/named.conf.dlz | 3 +++ > 2 files changed, 8 insertions(+), 1 deletion(-) > >diff --git a/python/samba/provision/sambadns.py b/python/samba/provision/sambadns.py >index a393181..ab596ce 100644 >--- a/python/samba/provision/sambadns.py >+++ b/python/samba/provision/sambadns.py >@@ -923,12 +923,15 @@ def create_named_conf(paths, realm, dnsdomain, dns_backend, logger): > bind9_8 = '#' > bind9_9 = '#' > bind9_10 = '#' >+ bind9_11 = '#' > if bind_info.upper().find('BIND 9.8') != -1: > bind9_8 = '' > elif bind_info.upper().find('BIND 9.9') != -1: > bind9_9 = '' > elif bind_info.upper().find('BIND 9.10') != -1: > bind9_10 = '' >+ elif bind_info.upper().find('BIND 9.11') != -1: >+ bind9_11 = '' > elif bind_info.upper().find('BIND 9.7') != -1: > raise ProvisioningError("DLZ option incompatible with BIND 9.7.") > else: >@@ -938,7 +941,8 @@ def create_named_conf(paths, realm, dnsdomain, dns_backend, logger): > "MODULESDIR" : samba.param.modules_dir(), > "BIND9_8" : bind9_8, > "BIND9_9" : bind9_9, >- "BIND9_10" : bind9_10 >+ "BIND9_10" : bind9_10, >+ "BIND9_11" : bind9_11 > }) > > >diff --git a/source4/setup/named.conf.dlz b/source4/setup/named.conf.dlz >index 460d2ca..215af5a 100644 >--- a/source4/setup/named.conf.dlz >+++ b/source4/setup/named.conf.dlz >@@ -18,5 +18,8 @@ dlz "AD DNS Zone" { > > # For BIND 9.10.x > ${BIND9_10} database "dlopen ${MODULESDIR}/bind9/dlz_bind9_10.so"; >+ >+ # For BIND 9.11.x >+ ${BIND9_11} database "dlopen ${MODULESDIR}/bind9/dlz_bind9_11.so"; > }; > >-- >2.7.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
amitay
:
review?
(
jra
)
martins
:
review+
Actions:
View
Attachments on
bug 12366
:
12605
| 12606