[SCM] Samba Shared Repository - branch v4-15-test updated

Jule Anger janger at samba.org
Sat Jun 18 09:47:01 UTC 2022


The branch, v4-15-test has been updated
       via  a1bb535cfb3 cmdline_s4: re-initialise logging once loadparm is ready
       via  b7c4480448e s4/dlz: add support for bind 9.18
      from  1f42a865fae Revert "lib:util: Remove NIS support from string_match()"

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-15-test


- Log -----------------------------------------------------------------
commit a1bb535cfb37f7e0534a0bcdd0ea2bf918a0ac42
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Thu May 26 15:46:08 2022 +1200

    cmdline_s4: re-initialise logging once loadparm is ready
    
    The first time round we maybe didn't know which files we wanted to log to.
    Suppose, for example, we had an smb.conf with
    
     log level = 1 dsdb_group_json_audit:5@/var/log/group_json.log
    
    we wouldn't see anything in "/var/log/group_json.log", while the level
    5 dsdb_group_json_audit messages would go into the main log.
    
    Note that the named file would still be opened by winbindd and others
    that use the s3 code, but would remain empty as they don't have anything
    to say about dsdb_group_json_audit.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15076
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    (cherry picked from commit 9537ac723cfdc43e718fdd08dc28883e7057a372)
    
    Autobuild-User(v4-15-test): Jule Anger <janger at samba.org>
    Autobuild-Date(v4-15-test): Sat Jun 18 09:46:47 UTC 2022 on sn-devel-184

commit b7c4480448e16be71d1858932d1ef9a11ff8a50f
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Thu Feb 24 12:17:00 2022 +1300

    s4/dlz: add support for bind 9.18
    
    It seems nothing has changed since 9.16 for our purposes.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14986
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Signed-off-by: Andreas Hasenack <andreas at canonical.com>
    Pair-programmed-with: Andreas Hasenack <andreas at canonical.com>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Douglas Bagnall <dbagnall at samba.org>
    Autobuild-Date(master): Mon May 23 00:53:09 UTC 2022 on sn-devel-184
    
    (cherry picked from commit 03036442deac25f58be4119e6c9ce2586e0abf51)

-----------------------------------------------------------------------

Summary of changes:
 lib/cmdline/cmdline_s4.c           | 22 +++++++++++++++++-----
 python/samba/provision/sambadns.py |  6 +++++-
 source4/dns_server/dlz_minimal.h   |  3 +++
 source4/dns_server/wscript_build   | 10 ++++++++++
 source4/setup/named.conf.dlz       |  3 +++
 5 files changed, 38 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/cmdline/cmdline_s4.c b/lib/cmdline/cmdline_s4.c
index 29e9f34bbe2..f8be4ed670c 100644
--- a/lib/cmdline/cmdline_s4.c
+++ b/lib/cmdline/cmdline_s4.c
@@ -31,6 +31,8 @@ static bool _samba_cmdline_load_config_s4(void)
 {
 	struct loadparm_context *lp_ctx = samba_cmdline_get_lp_ctx();
 	const char *config_file = NULL;
+	const struct samba_cmdline_daemon_cfg *cmdline_daemon_cfg = \
+		samba_cmdline_get_daemon_cfg();
 	bool ok;
 
 	/* Load smb conf */
@@ -45,15 +47,11 @@ static bool _samba_cmdline_load_config_s4(void)
 	}
 
 	switch (_config_type) {
-	case SAMBA_CMDLINE_CONFIG_SERVER: {
-		const struct samba_cmdline_daemon_cfg *cmdline_daemon_cfg =
-			samba_cmdline_get_daemon_cfg();
-
+	case SAMBA_CMDLINE_CONFIG_SERVER:
 		if (!cmdline_daemon_cfg->interactive) {
 			setup_logging(getprogname(), DEBUG_FILE);
 		}
 		break;
-	}
 	default:
 		break;
 	}
@@ -70,6 +68,20 @@ static bool _samba_cmdline_load_config_s4(void)
 		}
 	}
 
+	switch (_config_type) {
+	case SAMBA_CMDLINE_CONFIG_SERVER:
+		/*
+		 * We need to setup_logging *again* to ensure multi-file
+		 * logging is set up as specified in smb.conf.
+		 */
+		if (!cmdline_daemon_cfg->interactive) {
+			setup_logging(getprogname(), DEBUG_FILE);
+		}
+		break;
+	default:
+		break;
+	}
+
 	return true;
 }
 
diff --git a/python/samba/provision/sambadns.py b/python/samba/provision/sambadns.py
index 6823f9ee56b..404b346a885 100644
--- a/python/samba/provision/sambadns.py
+++ b/python/samba/provision/sambadns.py
@@ -1017,6 +1017,7 @@ def create_named_conf(paths, realm, dnsdomain, dns_backend, logger):
         bind9_12 = '#'
         bind9_14 = '#'
         bind9_16 = '#'
+        bind9_18 = '#'
         if bind_info.upper().find('BIND 9.8') != -1:
             bind9_8 = ''
         elif bind_info.upper().find('BIND 9.9') != -1:
@@ -1031,6 +1032,8 @@ def create_named_conf(paths, realm, dnsdomain, dns_backend, logger):
             bind9_14 = ''
         elif bind_info.upper().find('BIND 9.16') != -1:
             bind9_16 = ''
+        elif bind_info.upper().find('BIND 9.18') != -1:
+            bind9_18 = ''
         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:
@@ -1050,7 +1053,8 @@ def create_named_conf(paths, realm, dnsdomain, dns_backend, logger):
                     "BIND9_11": bind9_11,
                     "BIND9_12": bind9_12,
                     "BIND9_14": bind9_14,
-                    "BIND9_16": bind9_16
+                    "BIND9_16": bind9_16,
+                    "BIND9_18": bind9_18
                     })
 
 
diff --git a/source4/dns_server/dlz_minimal.h b/source4/dns_server/dlz_minimal.h
index e2a14266810..b7e36e7f8e6 100644
--- a/source4/dns_server/dlz_minimal.h
+++ b/source4/dns_server/dlz_minimal.h
@@ -48,6 +48,9 @@
 #elif defined (BIND_VERSION_9_16)
 # define DLZ_DLOPEN_VERSION 3
 # define DNS_CLIENTINFO_VERSION 2
+#elif defined (BIND_VERSION_9_18)
+# 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 8f606f92692..ab0a241b937 100644
--- a/source4/dns_server/wscript_build
+++ b/source4/dns_server/wscript_build
@@ -70,6 +70,16 @@ bld.SAMBA_LIBRARY('dlz_bind9_16',
                   deps='samba-hostconfig samdb-common gensec popt dnsserver_common',
                   enabled=bld.AD_DC_BUILD_IS_ENABLED())
 
+bld.SAMBA_LIBRARY('dlz_bind9_18',
+                  source='dlz_bind9.c',
+                  cflags='-DBIND_VERSION_9_18',
+                  private_library=True,
+                  link_name='modules/bind9/dlz_bind9_18.so',
+                  realname='dlz_bind9_18.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_16',
diff --git a/source4/setup/named.conf.dlz b/source4/setup/named.conf.dlz
index c2c41e2cddf..cbe7d805f58 100644
--- a/source4/setup/named.conf.dlz
+++ b/source4/setup/named.conf.dlz
@@ -30,5 +30,8 @@ dlz "AD DNS Zone" {
 
     # For BIND 9.16.x
     ${BIND9_16} database "dlopen ${MODULESDIR}/bind9/dlz_bind9_16.so";
+    #
+    # For BIND 9.18.x
+    ${BIND9_18} database "dlopen ${MODULESDIR}/bind9/dlz_bind9_18.so";
 };
 


-- 
Samba Shared Repository



More information about the samba-cvs mailing list