[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Mon May 17 22:29:01 UTC 2021


The branch, master has been updated
       via  a204e42c2f8 dlz: remove support for ancient binds
       via  3103d948f6b dlz: do not build for Bind 9.8 or 9.9
       via  3ef2b588e85 dlz torture: update to supported DLZ API
       via  7d7017b3024 samba-tool:testparm: Display nicer parameter dump error messages
       via  11f26877ce1 samba-tool:testparm: Test error handling for unknown sections and parameters
       via  e54563861b2 samba-tool:testparm: Fix error with --section-name
       via  33bb6ad3563 samba-tool:testparm: Test that --section-name works without --parameter-name
      from  52744d35a37 nmbd: Reduce the wait interface loop sleep time

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit a204e42c2f84cb0930f6996880af4de85f5794ec
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Fri Apr 23 19:37:55 2021 +1200

    dlz: remove support for ancient binds
    
    We no longer support versions of bind that have
    DLZ_DLOPEN_VERSION != 3, so we no longer need all these ifdefs.
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Mon May 17 22:29:01 UTC 2021 on sn-devel-184

commit 3103d948f6b94872326d8b7e88fe328fed910eae
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Sat Apr 24 15:25:25 2021 +1200

    dlz: do not build for Bind 9.8 or 9.9
    
    If we drop support for versions before Bind 9.10 (which itself went
    EOL in 2018) we can get rid of a whole lot of ifdefs for old API
    versions that no-one should be using.
    
    This patch stops the build, the next one clears out the ifdefs.
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 3ef2b588e85ae47c52da16245fe873619a49e2fb
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Sat Apr 24 15:25:44 2021 +1200

    dlz torture: update to supported DLZ API
    
    Bind 9.8 went EOL in 2014, but we still run our tests using the API
    version that it alone uses.
    
    This patch changes it to use the API of versions 9.10 onwards.
    
    We don't change what we test or make use of the new API, just pass
    around some NULL pointers.
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 7d7017b30248c2855248a9bab56fd5b91597686c
Author: Joseph Sutton <josephsutton at catalyst.net.nz>
Date:   Wed Apr 28 15:46:46 2021 +1200

    samba-tool:testparm: Display nicer parameter dump error messages
    
    Now we catch errors for unknown sections or parameters and turn them
    into CommandErrors.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14143
    
    Signed-off-by: Joseph Sutton <josephsutton at catalyst.net.nz>
    Reviewed-by: Rowland Penny <rpenny at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 11f26877ce1849439948c8d1f12dc9dd43cd534d
Author: Joseph Sutton <josephsutton at catalyst.net.nz>
Date:   Thu Apr 29 20:23:21 2021 +1200

    samba-tool:testparm: Test error handling for unknown sections and parameters
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14143
    
    Signed-off-by: Joseph Sutton <josephsutton at catalyst.net.nz>
    Reviewed-by: Rowland Penny <rpenny at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit e54563861b2b06370fe3a2a10d7e7df2e3e18f24
Author: Joseph Sutton <josephsutton at catalyst.net.nz>
Date:   Thu Apr 22 12:57:24 2021 +1200

    samba-tool:testparm: Fix error with --section-name
    
    Pass the correct parameters into LoadparmService.dump() so that
    --section-name works properly.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14143
    
    Signed-off-by: Joseph Sutton <josephsutton at catalyst.net.nz>
    Reviewed-by: Rowland Penny <rpenny at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 33bb6ad35635590be112e94941dbfc02b4db1d30
Author: Joseph Sutton <josephsutton at catalyst.net.nz>
Date:   Thu Apr 29 20:17:09 2021 +1200

    samba-tool:testparm: Test that --section-name works without --parameter-name
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14143
    
    Signed-off-by: Joseph Sutton <josephsutton at catalyst.net.nz>
    Reviewed-by: Rowland Penny <rpenny at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

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

Summary of changes:
 WHATSNEW.txt                      |  2 +
 python/samba/netcmd/testparm.py   | 12 +++++-
 python/samba/tests/netcmd.py      | 68 ++++++++++++++++++++++++++++++++-
 source4/dns_server/dlz_bind9.c    | 17 ---------
 source4/dns_server/dlz_minimal.h  | 32 ++--------------
 source4/dns_server/wscript_build  | 22 +----------
 source4/torture/dns/dlz_bind9.c   | 79 ++++++++++++++++++++++++++-------------
 source4/torture/dns/wscript_build |  2 +-
 8 files changed, 138 insertions(+), 96 deletions(-)


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 013f5b6eb35..1e407da422e 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -49,6 +49,8 @@ supported release of Tru64 UNIX was in 2012.
 NIS support has been removed from this release. This is not
 available in Linux distributions anymore.
 
+The DLZ DNS plugin is no longer built for Bind versions 9.8 and 9.9,
+which have been out of support since 2018.
 
 smb.conf changes
 ================
diff --git a/python/samba/netcmd/testparm.py b/python/samba/netcmd/testparm.py
index aef24bf5c8d..b44dea1f141 100644
--- a/python/samba/netcmd/testparm.py
+++ b/python/samba/netcmd/testparm.py
@@ -103,9 +103,17 @@ class cmd_testparm(Command):
         else:
             if section_name is not None or parameter_name is not None:
                 if parameter_name is None:
-                    lp[section_name].dump(verbose)
+                    try:
+                        section = lp[section_name]
+                    except KeyError:
+                        raise CommandError("Unknown section %s" % section_name)
+                    else:
+                        section.dump(lp.default_service, verbose)
                 else:
-                    lp.dump_a_parameter(parameter_name, section_name)
+                    try:
+                        lp.dump_a_parameter(parameter_name, section_name)
+                    except RuntimeError as e:
+                        raise CommandError(e)
             else:
                 if not suppress_prompt:
                     self.outf.write("Press enter to see a dump of your service definitions\n")
diff --git a/python/samba/tests/netcmd.py b/python/samba/tests/netcmd.py
index 08d5bda8dda..4bcddd332e7 100644
--- a/python/samba/tests/netcmd.py
+++ b/python/samba/tests/netcmd.py
@@ -17,6 +17,9 @@
 
 """Tests for samba.netcmd."""
 
+import os
+import tempfile
+
 from io import StringIO
 from samba.netcmd import Command
 from samba.netcmd.testparm import cmd_testparm
@@ -24,7 +27,7 @@ from samba.netcmd.main import cmd_sambatool
 import samba.tests
 
 
-class NetCmdTestCase(samba.tests.TestCase):
+class NetCmdTestCase(samba.tests.TestCaseInTempDir):
 
     def run_netcmd(self, cmd_klass, args, retcode=0):
         cmd = cmd_klass(outf=StringIO(), errf=StringIO())
@@ -48,6 +51,33 @@ class NetCmdTestCase(samba.tests.TestCase):
 
 class TestParmTests(NetCmdTestCase):
 
+    def setUp(self):
+        super().setUp()
+
+        # Override these global parameters in case their default values are
+        # invalid.
+        contents = """[global]
+    netbios name = test
+    lock dir = /
+    pid directory = /
+[tmp]
+    path = /
+"""
+        self.smbconf = self.create_smbconf(contents)
+
+    def create_smbconf(self, contents):
+        smbconf = tempfile.NamedTemporaryFile(mode='w',
+                                              dir=self.tempdir,
+                                              delete=False)
+        self.addCleanup(os.remove, smbconf.name)
+
+        try:
+            smbconf.write(contents)
+        finally:
+            smbconf.close()
+
+        return smbconf
+
     def test_no_client_ip(self):
         out, err = self.run_netcmd(cmd_testparm, ["--client-name=foo"],
                                    retcode=-1)
@@ -56,6 +86,42 @@ class TestParmTests(NetCmdTestCase):
             "ERROR: Both a DNS name and an IP address are "
             "required for the host access check\n", err)
 
+    def test_section(self):
+        # We don't get an opportunity to verify the output, as the parameters
+        # are dumped directly to stdout, so just check the return code.
+        self.run_netcmd(cmd_testparm,
+                        ["--configfile=%s" % self.smbconf.name,
+                         "--section-name=tmp"],
+                        retcode=None)
+
+    def test_no_such_section(self):
+        out, err = self.run_netcmd(cmd_testparm,
+                                   ["--configfile=%s" % self.smbconf.name,
+                                    "--section-name=foo"],
+                                   retcode=-1)
+        # Ensure all exceptions are caught.
+        self.assertEqual("", out)
+        self.assertNotIn("uncaught exception", err)
+
+        out, err = self.run_netcmd(cmd_testparm,
+                                   ["--configfile=%s" % self.smbconf.name,
+                                    "--section-name=foo",
+                                    "--parameter-name=foo"],
+                                   retcode=-1)
+        # Ensure all exceptions are caught.
+        self.assertEqual("", out)
+        self.assertNotIn("uncaught exception", err)
+
+    def test_no_such_parameter(self):
+        out, err = self.run_netcmd(cmd_testparm,
+                                   ["--configfile=%s" % self.smbconf.name,
+                                    "--section-name=tmp",
+                                    "--parameter-name=foo"],
+                                   retcode=-1)
+        # Ensure all exceptions are caught.
+        self.assertEqual("", out)
+        self.assertNotIn("uncaught exception", err)
+
 
 class CommandTests(NetCmdTestCase):
 
diff --git a/source4/dns_server/dlz_bind9.c b/source4/dns_server/dlz_bind9.c
index 6f729f46561..38fc15534be 100644
--- a/source4/dns_server/dlz_bind9.c
+++ b/source4/dns_server/dlz_bind9.c
@@ -955,13 +955,9 @@ static isc_result_t b9_find_name_dn(struct dlz_bind9_data *state, const char *na
 /*
   see if we handle a given zone
  */
-#if DLZ_DLOPEN_VERSION < 3
-_PUBLIC_ isc_result_t dlz_findzonedb(void *dbdata, const char *name)
-#else
 _PUBLIC_ isc_result_t dlz_findzonedb(void *dbdata, const char *name,
 				     dns_clientinfomethods_t *methods,
 				     dns_clientinfo_t *clientinfo)
-#endif
 {
 	struct timeval start = timeval_current();
 	struct dlz_bind9_data *state = talloc_get_type_abort(dbdata, struct dlz_bind9_data);
@@ -1076,15 +1072,10 @@ static isc_result_t dlz_lookup_types(struct dlz_bind9_data *state,
 /*
   lookup one record
  */
-#if DLZ_DLOPEN_VERSION == 1
-_PUBLIC_ isc_result_t dlz_lookup(const char *zone, const char *name,
-				 void *dbdata, dns_sdlzlookup_t *lookup)
-#else
 _PUBLIC_ isc_result_t dlz_lookup(const char *zone, const char *name,
 				 void *dbdata, dns_sdlzlookup_t *lookup,
 				 dns_clientinfomethods_t *methods,
 				 dns_clientinfo_t *clientinfo)
-#endif
 {
 	struct dlz_bind9_data *state = talloc_get_type_abort(dbdata, struct dlz_bind9_data);
 	isc_result_t result = ISC_R_SUCCESS;
@@ -1444,12 +1435,8 @@ static bool b9_zone_exists(struct dlz_bind9_data *state, const char *name)
 /*
   configure a writeable zone
  */
-#if DLZ_DLOPEN_VERSION < 3
-_PUBLIC_ isc_result_t dlz_configure(dns_view_t *view, void *dbdata)
-#else
 _PUBLIC_ isc_result_t dlz_configure(dns_view_t *view, dns_dlzdb_t *dlzdb,
 				    void *dbdata)
-#endif
 {
 	struct dlz_bind9_data *state = talloc_get_type_abort(dbdata, struct dlz_bind9_data);
 	TALLOC_CTX *tmp_ctx;
@@ -1520,11 +1507,7 @@ _PUBLIC_ isc_result_t dlz_configure(dns_view_t *view, dns_dlzdb_t *dlzdb,
 				return ISC_R_NOMEMORY;
 			}
 
-#if DLZ_DLOPEN_VERSION < 3
-			result = state->writeable_zone(view, zone);
-#else
 			result = state->writeable_zone(view, dlzdb, zone);
-#endif
 			if (result != ISC_R_SUCCESS) {
 				state->log(ISC_LOG_ERROR, "samba_dlz: Failed to configure zone '%s'",
 					   zone);
diff --git a/source4/dns_server/dlz_minimal.h b/source4/dns_server/dlz_minimal.h
index d991528d6ad..e2a14266810 100644
--- a/source4/dns_server/dlz_minimal.h
+++ b/source4/dns_server/dlz_minimal.h
@@ -27,11 +27,9 @@
 #include <stdbool.h>
 
 #if defined (BIND_VERSION_9_8)
-# define DLZ_DLOPEN_VERSION 1
+# error Bind 9.8 is not supported!
 #elif defined (BIND_VERSION_9_9)
-# define DLZ_DLOPEN_VERSION 2
-# define DNS_CLIENTINFO_VERSION 1
-# define ISC_BOOLEAN_AS_BOOL 0
+# error Bind 9.9 is not supported!
 #elif defined (BIND_VERSION_9_10)
 # define DLZ_DLOPEN_VERSION 3
 # define DNS_CLIENTINFO_VERSION 1
@@ -58,9 +56,7 @@
 #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 ISC_BOOLEAN_AS_BOOL == 1
@@ -111,7 +107,6 @@ typedef void *dns_sdlzallnodes_t;
 typedef void *dns_view_t;
 typedef void *dns_dlzdb_t;
 
-#if DLZ_DLOPEN_VERSION > 1
 /*
  * Method and type definitions needed for retrieval of client info
  * from the caller.
@@ -172,7 +167,6 @@ typedef struct dns_clientinfomethods {
 
 #endif /* DNS_CLIENTINFO_VERSION */
 
-#endif /* DLZ_DLOPEN_VERSION > 1 */
 
 /*
  * Method definitions for callbacks provided by the dlopen driver
@@ -191,14 +185,10 @@ typedef isc_result_t dns_sdlz_putnamedrr_t(dns_sdlzallnodes_t *allnodes,
 					   dns_ttl_t ttl,
 					   const char *data);
 
-#if DLZ_DLOPEN_VERSION < 3
-typedef isc_result_t dns_dlz_writeablezone_t(dns_view_t *view,
-					     const char *zone_name);
-#else /* DLZ_DLOPEN_VERSION >= 3 */
 typedef isc_result_t dns_dlz_writeablezone_t(dns_view_t *view,
 					     dns_dlzdb_t *dlzdb,
 					     const char *zone_name);
-#endif /* DLZ_DLOPEN_VERSION */
+
 
 /*
  * prototypes for the functions you can include in your module
@@ -231,30 +221,19 @@ dlz_destroy(void *dbdata);
 /*
  * dlz_findzonedb is required for all DLZ external drivers
  */
-#if DLZ_DLOPEN_VERSION < 3
-isc_result_t
-dlz_findzonedb(void *dbdata, const char *name);
-#else /* DLZ_DLOPEN_VERSION >= 3 */
 isc_result_t
 dlz_findzonedb(void *dbdata, const char *name,
 	       dns_clientinfomethods_t *methods,
 	       dns_clientinfo_t *clientinfo);
-#endif /* DLZ_DLOPEN_VERSION */
 
 /*
  * dlz_lookup is required for all DLZ external drivers
  */
-#if DLZ_DLOPEN_VERSION == 1
-isc_result_t
-dlz_lookup(const char *zone, const char *name, void *dbdata,
-	   dns_sdlzlookup_t *lookup);
-#else /* DLZ_DLOPEN_VERSION > 1 */
 isc_result_t
 dlz_lookup(const char *zone, const char *name, void *dbdata,
 	   dns_sdlzlookup_t *lookup,
 	   dns_clientinfomethods_t *methods,
 	   dns_clientinfo_t *clientinfo);
-#endif /* DLZ_DLOPEN_VERSION */
 
 /*
  * dlz_authority() is optional if dlz_lookup() supplies
@@ -296,13 +275,8 @@ dlz_closeversion(const char *zone, isc_boolean_t commit, void *dbdata,
  * dlz_configure() is optional, but must be supplied if you want to support
  * dynamic updates
  */
-#if DLZ_DLOPEN_VERSION < 3
-isc_result_t
-dlz_configure(dns_view_t *view, void *dbdata);
-#else /* DLZ_DLOPEN_VERSION >= 3 */
 isc_result_t
 dlz_configure(dns_view_t *view, dns_dlzdb_t *dlzdb, void *dbdata);
-#endif /* DLZ_DLOPEN_VERSION */
 
 /*
  * dlz_ssumatch() is optional, but must be supplied if you want to support
diff --git a/source4/dns_server/wscript_build b/source4/dns_server/wscript_build
index 85ffb4c7b2f..ce786f635ae 100644
--- a/source4/dns_server/wscript_build
+++ b/source4/dns_server/wscript_build
@@ -18,26 +18,6 @@ bld.SAMBA_MODULE('service_dns',
         )
 
 # a bind9 dlz module giving access to the Samba DNS SAM
-bld.SAMBA_LIBRARY('dlz_bind9',
-                  source='dlz_bind9.c',
-                  cflags='-DBIND_VERSION_9_8',
-                  private_library=True,
-                  link_name='modules/bind9/dlz_bind9.so',
-                  realname='dlz_bind9.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_9',
-                  source='dlz_bind9.c',
-                  cflags='-DBIND_VERSION_9_9',
-                  private_library=True,
-                  link_name='modules/bind9/dlz_bind9_9.so',
-                  realname='dlz_bind9_9.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_10',
                   source='dlz_bind9.c',
                   cflags='-DBIND_VERSION_9_10',
@@ -90,7 +70,7 @@ bld.SAMBA_LIBRARY('dlz_bind9_16',
 
 bld.SAMBA_LIBRARY('dlz_bind9_for_torture',
                   source='dlz_bind9.c',
-                  cflags='-DBIND_VERSION_9_8',
+                  cflags='-DBIND_VERSION_9_16',
                   private_library=True,
                   deps='samba-hostconfig samdb-common gensec popt dnsserver_common',
                   enabled=bld.AD_DC_BUILD_IS_ENABLED())
diff --git a/source4/torture/dns/dlz_bind9.c b/source4/torture/dns/dlz_bind9.c
index cd700fe986d..1e1f1e8bef9 100644
--- a/source4/torture/dns/dlz_bind9.c
+++ b/source4/torture/dns/dlz_bind9.c
@@ -19,6 +19,7 @@
 
 #include "includes.h"
 #include "torture/smbtorture.h"
+#include "system/network.h"
 #include "dns_server/dlz_minimal.h"
 #include <talloc.h>
 #include <ldb.h>
@@ -88,7 +89,8 @@ static bool test_dlz_bind9_create(struct torture_context *tctx)
 static bool calls_zone_hook = false;
 
 static isc_result_t dlz_bind9_writeable_zone_hook(dns_view_t *view,
-					   const char *zone_name)
+						  dns_dlzdb_t *dlzdb,
+						  const char *zone_name)
 {
 	struct torture_context *tctx = talloc_get_type((void *)view, struct torture_context);
 	struct ldb_context *samdb = NULL;
@@ -128,7 +130,8 @@ static isc_result_t dlz_bind9_writeable_zone_hook(dns_view_t *view,
 
 static bool test_dlz_bind9_configure(struct torture_context *tctx)
 {
-	void *dbdata;
+	void *dbdata = NULL;
+	dns_dlzdb_t *dlzdb = NULL;
 	const char *argv[] = {
 		"samba_dlz",
 		"-H",
@@ -143,7 +146,9 @@ static bool test_dlz_bind9_configure(struct torture_context *tctx)
 				 "Failed to create samba_dlz");
 
 	calls_zone_hook = false;
-	torture_assert_int_equal(tctx, dlz_configure((void*)tctx, dbdata),
+	torture_assert_int_equal(tctx, dlz_configure((void*)tctx,
+						     dlzdb,
+						     dbdata),
 						     ISC_R_SUCCESS,
 				 "Failed to configure samba_dlz");
 
@@ -167,6 +172,7 @@ static bool configure_multiple_dlzs(struct torture_context *tctx,
 				    void **dbdata, int count)
 {
 	int i, res;
+	dns_dlzdb_t *dlzdb = NULL;
 	const char *argv[] = {
 		"samba_dlz",
 		"-H",
@@ -183,7 +189,7 @@ static bool configure_multiple_dlzs(struct torture_context *tctx,
 		torture_assert_int_equal(tctx, res, ISC_R_SUCCESS,
 					 "Failed to create samba_dlz");
 
-		res = dlz_configure((void*)tctx, dbdata[i]);
+		res = dlz_configure((void*)tctx, dlzdb, dbdata[i]);
 		torture_assert_int_equal(tctx, res, ISC_R_SUCCESS,
 					 "Failed to configure samba_dlz");
 	}
@@ -239,6 +245,7 @@ static bool test_dlz_bind9_destroy_newest_first(struct torture_context *tctx)
 static bool test_dlz_bind9_gensec(struct torture_context *tctx, const char *mech)
 {
 	NTSTATUS status;
+	dns_dlzdb_t *dlzdb = NULL;
 
 	struct gensec_security *gensec_client_context;
 
@@ -258,7 +265,8 @@ static bool test_dlz_bind9_gensec(struct torture_context *tctx, const char *mech
 				 ISC_R_SUCCESS,
 				 "Failed to create samba_dlz");
 
-	torture_assert_int_equal(tctx, dlz_configure((void*)tctx, dbdata),
+	torture_assert_int_equal(tctx, dlz_configure((void*)tctx,
+						     dlzdb, dbdata),
 						     ISC_R_SUCCESS,
 				 "Failed to configure samba_dlz");
 
@@ -424,7 +432,10 @@ static isc_result_t dlz_bind9_putnamedrr_hook(dns_sdlzallnodes_t *allnodes,
 static bool test_dlz_bind9_lookup(struct torture_context *tctx)
 {
 	size_t i;
-	void *dbdata;
+	void *dbdata = NULL;
+	dns_clientinfomethods_t *methods = NULL;
+	dns_clientinfo_t *clientinfo = NULL;
+	dns_dlzdb_t *dlzdb = NULL;
 	const char *argv[] = {
 		"samba_dlz",
 		"-H",
@@ -444,8 +455,9 @@ static bool test_dlz_bind9_lookup(struct torture_context *tctx)
 				 ISC_R_SUCCESS,
 				 "Failed to create samba_dlz");
 
-	torture_assert_int_equal(tctx, dlz_configure((void*)tctx, dbdata),
-						     ISC_R_SUCCESS,
+	torture_assert_int_equal(tctx,
+				 dlz_configure((void*)tctx, dlzdb, dbdata),
+				 ISC_R_SUCCESS,
 				 "Failed to configure samba_dlz");
 
 	expected1 = talloc_zero(tctx, struct test_expected_rr);
@@ -488,7 +500,8 @@ static bool test_dlz_bind9_lookup(struct torture_context *tctx)
 
 	torture_assert_int_equal(tctx, dlz_lookup(lpcfg_dnsdomain(tctx->lp_ctx),
 						  expected1->query_name, dbdata,
-						  (dns_sdlzlookup_t *)expected1),
+						  (dns_sdlzlookup_t *)expected1,
+						  methods, clientinfo),
 				 ISC_R_SUCCESS,
 				 "Failed to lookup @");
 	for (i = 0; i < expected1->num_records; i++) {
@@ -524,7 +537,8 @@ static bool test_dlz_bind9_lookup(struct torture_context *tctx)
 
 	torture_assert_int_equal(tctx, dlz_lookup(lpcfg_dnsdomain(tctx->lp_ctx),
 						  expected2->query_name, dbdata,
-						  (dns_sdlzlookup_t *)expected2),
+						  (dns_sdlzlookup_t *)expected2,
+						  methods, clientinfo),
 				 ISC_R_SUCCESS,
 				 "Failed to lookup hostname");
 	for (i = 0; i < expected2->num_records; i++) {
@@ -549,7 +563,8 @@ static bool test_dlz_bind9_lookup(struct torture_context *tctx)
 static bool test_dlz_bind9_zonedump(struct torture_context *tctx)
 {
 	size_t i;
-	void *dbdata;
+	void *dbdata = NULL;
+	dns_dlzdb_t *dlzdb = NULL;
 	const char *argv[] = {
 		"samba_dlz",
 		"-H",
@@ -568,7 +583,7 @@ static bool test_dlz_bind9_zonedump(struct torture_context *tctx)
 				 ISC_R_SUCCESS,
 				 "Failed to create samba_dlz");
 
-	torture_assert_int_equal(tctx, dlz_configure((void*)tctx, dbdata),
+	torture_assert_int_equal(tctx, dlz_configure((void*)tctx, dlzdb, dbdata),
 						     ISC_R_SUCCESS,
 				 "Failed to configure samba_dlz");
 
@@ -660,7 +675,8 @@ static bool test_dlz_bind9_update01(struct torture_context *tctx)
 	NTSTATUS status;
 	struct gensec_security *gensec_client_context;
 	DATA_BLOB client_to_server, server_to_client;
-	void *dbdata;
+	void *dbdata = NULL;
+	dns_dlzdb_t *dlzdb = NULL;
 	void *version = NULL;
 	const char *argv[] = {
 		"samba_dlz",
@@ -674,6 +690,8 @@ static bool test_dlz_bind9_update01(struct torture_context *tctx)
 	char *data1 = NULL;
 	char *data2 = NULL;
 	bool ret = false;
+	dns_clientinfomethods_t *methods = NULL;
+	dns_clientinfo_t *clientinfo = NULL;
 
 	tctx_static = tctx;


-- 
Samba Shared Repository



More information about the samba-cvs mailing list