From d225cf4ded9ca726abcaccb93916a5ef53a51812 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Fri, 11 Sep 2020 12:16:01 +1000 Subject: [PATCH 1/8] bind9-dlz: Bind 9.13.x switched to using bool as isc_boolean_t instead of int. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14487 Signed-off-by: Amitay Isaacs Reviewed-by: Rowland Penny (cherry picked from commit cdb6c5d1eca1c0f6967941dbd1da07be6b53d302) --- source4/dns_server/dlz_minimal.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/source4/dns_server/dlz_minimal.h b/source4/dns_server/dlz_minimal.h index 193904f4b2c..9a7090f48fd 100644 --- a/source4/dns_server/dlz_minimal.h +++ b/source4/dns_server/dlz_minimal.h @@ -23,30 +23,41 @@ #ifndef DLZ_MINIMAL_H #define DLZ_MINIMAL_H 1 +#include +#include + #if defined (BIND_VERSION_9_8) # define DLZ_DLOPEN_VERSION 1 #elif defined (BIND_VERSION_9_9) # define DLZ_DLOPEN_VERSION 2 # define DNS_CLIENTINFO_VERSION 1 +# define ISC_BOOLEAN_AS_BOOL 0 #elif defined (BIND_VERSION_9_10) # define DLZ_DLOPEN_VERSION 3 # define DNS_CLIENTINFO_VERSION 1 +# define ISC_BOOLEAN_AS_BOOL 0 #elif defined (BIND_VERSION_9_11) # define DLZ_DLOPEN_VERSION 3 # define DNS_CLIENTINFO_VERSION 2 +# define ISC_BOOLEAN_AS_BOOL 0 #elif defined (BIND_VERSION_9_12) # define DLZ_DLOPEN_VERSION 3 # define DNS_CLIENTINFO_VERSION 2 +# define ISC_BOOLEAN_AS_BOOL 0 #else # error Unsupported BIND version #endif +#ifndef ISC_BOOLEAN_AS_BOOL +#define ISC_BOOLEAN_AS_BOOL 1 +#endif + #if DLZ_DLOPEN_VERSION > 1 # define DLZ_DLOPEN_AGE 0 #endif typedef unsigned int isc_result_t; -#if DLZ_DLOPEN_VERSION == 1 +#if ISC_BOOLEAN_AS_BOOL == 1 typedef bool isc_boolean_t; #else typedef int isc_boolean_t; @@ -72,8 +83,13 @@ typedef uint32_t dns_ttl_t; #define ISC_R_FILENOTFOUND 38 /* boolean values */ +#if ISC_BOOLEAN_AS_BOOL == 1 +#define ISC_TRUE true +#define ISC_FALSE false +#else #define ISC_TRUE 1 #define ISC_FALSE 0 +#endif /* log levels */ #define ISC_LOG_INFO (-1) -- 2.26.2 From c61053fc2279c2add8c726648f8d9257a6db9001 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Mon, 14 Sep 2020 09:44:10 +1000 Subject: [PATCH 2/8] provision: BIND 9.13.x is not supported BUG: https://bugzilla.samba.org/show_bug.cgi?id=14487 Signed-off-by: Amitay Isaacs Reviewed-by: Rowland Penny (cherry picked from commit 95278618829227632b2bcb29fc272e600607ea41) --- python/samba/provision/sambadns.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/samba/provision/sambadns.py b/python/samba/provision/sambadns.py index ffdb2559979..6071a9ac18c 100644 --- a/python/samba/provision/sambadns.py +++ b/python/samba/provision/sambadns.py @@ -974,6 +974,8 @@ def create_named_conf(paths, realm, dnsdomain, dns_backend, logger): bind9_12 = '' elif bind_info.upper().find('BIND 9.7') != -1: raise ProvisioningError("DLZ option incompatible with BIND 9.7.") + elif bind_info.upper().find('BIND_9.13') != -1: + raise ProvisioningError("Only stable/esv releases of BIND are supported.") else: logger.warning("BIND version unknown, please modify %s manually." % paths.namedconf) setup_file(setup_path("named.conf.dlz"), paths.namedconf, { -- 2.26.2 From 561b58ae41a895b43229aef7ffefd614f6f841b2 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Fri, 11 Sep 2020 12:24:51 +1000 Subject: [PATCH 3/8] bind9-dlz: Add support for BIND 9.14.x BUG: https://bugzilla.samba.org/show_bug.cgi?id=14487 Signed-off-by: Amitay Isaacs Reviewed-by: Rowland Penny (cherry picked from commit a167a2154d4909e8e1f97d9f36d0e4c947f2d944) --- source4/dns_server/dlz_minimal.h | 3 +++ source4/dns_server/wscript_build | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/source4/dns_server/dlz_minimal.h b/source4/dns_server/dlz_minimal.h index 9a7090f48fd..a82bb381ee1 100644 --- a/source4/dns_server/dlz_minimal.h +++ b/source4/dns_server/dlz_minimal.h @@ -44,6 +44,9 @@ # define DLZ_DLOPEN_VERSION 3 # define DNS_CLIENTINFO_VERSION 2 # define ISC_BOOLEAN_AS_BOOL 0 +#elif defined (BIND_VERSION_9_14) +# define DLZ_DLOPEN_VERSION 3 +# define DNS_CLIENTINFO_VERSION 2 #else # error Unsupported BIND version #endif diff --git a/source4/dns_server/wscript_build b/source4/dns_server/wscript_build index 8a8466d096f..b24aeb73d59 100644 --- a/source4/dns_server/wscript_build +++ b/source4/dns_server/wscript_build @@ -68,6 +68,16 @@ bld.SAMBA_LIBRARY('dlz_bind9_12', deps='samba-hostconfig samdb-common gensec popt dnsserver_common', enabled=bld.AD_DC_BUILD_IS_ENABLED()) +bld.SAMBA_LIBRARY('dlz_bind9_14', + source='dlz_bind9.c', + cflags='-DBIND_VERSION_9_14', + private_library=True, + link_name='modules/bind9/dlz_bind9_14.so', + realname='dlz_bind9_14.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.26.2 From 19e985874b70c1af797d5a8e95c2f1e95e631366 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Fri, 11 Sep 2020 12:26:21 +1000 Subject: [PATCH 4/8] provision: Add support for BIND 9.14.x BUG: https://bugzilla.samba.org/show_bug.cgi?id=14487 Signed-off-by: Amitay Isaacs Reviewed-by: Rowland Penny (cherry picked from commit 016c1174ef783990f93e348ee82f5c989c43cbbf) --- python/samba/provision/sambadns.py | 7 +++++-- source4/setup/named.conf.dlz | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/python/samba/provision/sambadns.py b/python/samba/provision/sambadns.py index 6071a9ac18c..2ef9320ba7d 100644 --- a/python/samba/provision/sambadns.py +++ b/python/samba/provision/sambadns.py @@ -962,6 +962,7 @@ def create_named_conf(paths, realm, dnsdomain, dns_backend, logger): bind9_10 = '#' bind9_11 = '#' bind9_12 = '#' + bind9_14 = '#' if bind_info.upper().find('BIND 9.8') != -1: bind9_8 = '' elif bind_info.upper().find('BIND 9.9') != -1: @@ -972,6 +973,8 @@ def create_named_conf(paths, realm, dnsdomain, dns_backend, logger): bind9_11 = '' elif bind_info.upper().find('BIND 9.12') != -1: bind9_12 = '' + elif bind_info.upper().find('BIND 9.14') != -1: + bind9_14 = '' elif bind_info.upper().find('BIND 9.7') != -1: raise ProvisioningError("DLZ option incompatible with BIND 9.7.") elif bind_info.upper().find('BIND_9.13') != -1: @@ -985,8 +988,8 @@ def create_named_conf(paths, realm, dnsdomain, dns_backend, logger): "BIND9_9": bind9_9, "BIND9_10": bind9_10, "BIND9_11": bind9_11, - "BIND9_12": bind9_12 - + "BIND9_12": bind9_12, + "BIND9_14": bind9_14 }) diff --git a/source4/setup/named.conf.dlz b/source4/setup/named.conf.dlz index 9341d7ea615..420e7b7c88d 100644 --- a/source4/setup/named.conf.dlz +++ b/source4/setup/named.conf.dlz @@ -24,5 +24,8 @@ dlz "AD DNS Zone" { # For BIND 9.12.x ${BIND9_12} database "dlopen ${MODULESDIR}/bind9/dlz_bind9_12.so"; + + # For BIND 9.14.x + ${BIND9_14} database "dlopen ${MODULESDIR}/bind9/dlz_bind9_14.so"; }; -- 2.26.2 From e2b019d19874581606e9289fecb213c1c1bb7c60 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Mon, 14 Sep 2020 09:45:04 +1000 Subject: [PATCH 5/8] provision: BIND 9.15.x is not supported BUG: https://bugzilla.samba.org/show_bug.cgi?id=14487 Signed-off-by: Amitay Isaacs Reviewed-by: Rowland Penny (cherry picked from commit 4d09797652059c3ed5b2a4f94f2181ce14d39972) --- python/samba/provision/sambadns.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/samba/provision/sambadns.py b/python/samba/provision/sambadns.py index 2ef9320ba7d..2827309694b 100644 --- a/python/samba/provision/sambadns.py +++ b/python/samba/provision/sambadns.py @@ -979,6 +979,8 @@ def create_named_conf(paths, realm, dnsdomain, dns_backend, logger): raise ProvisioningError("DLZ option incompatible with BIND 9.7.") elif bind_info.upper().find('BIND_9.13') != -1: raise ProvisioningError("Only stable/esv releases of BIND are supported.") + elif bind_info.upper().find('BIND_9.15') != -1: + raise ProvisioningError("Only stable/esv releases of BIND are supported.") else: logger.warning("BIND version unknown, please modify %s manually." % paths.namedconf) setup_file(setup_path("named.conf.dlz"), paths.namedconf, { -- 2.26.2 From e0f0141dab6d130f4e968529cdecc87776c1652c Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Fri, 11 Sep 2020 12:34:07 +1000 Subject: [PATCH 6/8] bind9-dlz: Add support for BIND 9.16.x BUG: https://bugzilla.samba.org/show_bug.cgi?id=14487 Signed-off-by: Amitay Isaacs Reviewed-by: Rowland Penny (cherry picked from commit ca3c18a236dedfdfbf225dcfcd0418f1634d8759) --- source4/dns_server/dlz_minimal.h | 3 +++ source4/dns_server/wscript_build | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/source4/dns_server/dlz_minimal.h b/source4/dns_server/dlz_minimal.h index a82bb381ee1..d991528d6ad 100644 --- a/source4/dns_server/dlz_minimal.h +++ b/source4/dns_server/dlz_minimal.h @@ -47,6 +47,9 @@ #elif defined (BIND_VERSION_9_14) # define DLZ_DLOPEN_VERSION 3 # define DNS_CLIENTINFO_VERSION 2 +#elif defined (BIND_VERSION_9_16) +# define DLZ_DLOPEN_VERSION 3 +# define DNS_CLIENTINFO_VERSION 2 #else # error Unsupported BIND version #endif diff --git a/source4/dns_server/wscript_build b/source4/dns_server/wscript_build index b24aeb73d59..e97c85de44a 100644 --- a/source4/dns_server/wscript_build +++ b/source4/dns_server/wscript_build @@ -78,6 +78,16 @@ bld.SAMBA_LIBRARY('dlz_bind9_14', deps='samba-hostconfig samdb-common gensec popt dnsserver_common', enabled=bld.AD_DC_BUILD_IS_ENABLED()) +bld.SAMBA_LIBRARY('dlz_bind9_16', + source='dlz_bind9.c', + cflags='-DBIND_VERSION_9_16', + private_library=True, + link_name='modules/bind9/dlz_bind9_16.so', + realname='dlz_bind9_16.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.26.2 From 35b72aeba63e91587c661c23d8481d6273e22802 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Fri, 11 Sep 2020 12:35:30 +1000 Subject: [PATCH 7/8] provision: Add support for BIND 9.16.x BUG: https://bugzilla.samba.org/show_bug.cgi?id=14487 Signed-off-by: Amitay Isaacs Reviewed-by: Rowland Penny (cherry picked from commit 5b2ccb1c7cad5cded5dad37a18a7d42c1680b2f7) --- 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 2827309694b..70381b8fec3 100644 --- a/python/samba/provision/sambadns.py +++ b/python/samba/provision/sambadns.py @@ -963,6 +963,7 @@ def create_named_conf(paths, realm, dnsdomain, dns_backend, logger): bind9_11 = '#' bind9_12 = '#' bind9_14 = '#' + bind9_16 = '#' if bind_info.upper().find('BIND 9.8') != -1: bind9_8 = '' elif bind_info.upper().find('BIND 9.9') != -1: @@ -975,6 +976,8 @@ def create_named_conf(paths, realm, dnsdomain, dns_backend, logger): bind9_12 = '' elif bind_info.upper().find('BIND 9.14') != -1: bind9_14 = '' + elif bind_info.upper().find('BIND 9.16') != -1: + bind9_16 = '' elif bind_info.upper().find('BIND 9.7') != -1: raise ProvisioningError("DLZ option incompatible with BIND 9.7.") elif bind_info.upper().find('BIND_9.13') != -1: @@ -991,7 +994,8 @@ def create_named_conf(paths, realm, dnsdomain, dns_backend, logger): "BIND9_10": bind9_10, "BIND9_11": bind9_11, "BIND9_12": bind9_12, - "BIND9_14": bind9_14 + "BIND9_14": bind9_14, + "BIND9_16": bind9_16 }) diff --git a/source4/setup/named.conf.dlz b/source4/setup/named.conf.dlz index 420e7b7c88d..c2c41e2cddf 100644 --- a/source4/setup/named.conf.dlz +++ b/source4/setup/named.conf.dlz @@ -27,5 +27,8 @@ dlz "AD DNS Zone" { # For BIND 9.14.x ${BIND9_14} database "dlopen ${MODULESDIR}/bind9/dlz_bind9_14.so"; + + # For BIND 9.16.x + ${BIND9_16} database "dlopen ${MODULESDIR}/bind9/dlz_bind9_16.so"; }; -- 2.26.2 From eb7b48f72ea6383de7e28f768354150d79f299e6 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Mon, 14 Sep 2020 09:45:50 +1000 Subject: [PATCH 8/8] provision: BIND 9.17.x is not supported BUG: https://bugzilla.samba.org/show_bug.cgi?id=14487 Signed-off-by: Amitay Isaacs Reviewed-by: Rowland Penny Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Thu Sep 24 05:55:43 UTC 2020 on sn-devel-184 (cherry picked from commit 1bccc67ce7c6364a95fbfeb095938522671578a8) --- python/samba/provision/sambadns.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/samba/provision/sambadns.py b/python/samba/provision/sambadns.py index 70381b8fec3..4aa132abfa6 100644 --- a/python/samba/provision/sambadns.py +++ b/python/samba/provision/sambadns.py @@ -984,6 +984,8 @@ def create_named_conf(paths, realm, dnsdomain, dns_backend, logger): raise ProvisioningError("Only stable/esv releases of BIND are supported.") elif bind_info.upper().find('BIND_9.15') != -1: raise ProvisioningError("Only stable/esv releases of BIND are supported.") + elif bind_info.upper().find('BIND_9.17') != -1: + raise ProvisioningError("Only stable/esv releases of BIND are supported.") else: logger.warning("BIND version unknown, please modify %s manually." % paths.namedconf) setup_file(setup_path("named.conf.dlz"), paths.namedconf, { -- 2.26.2