From 0098543d676d29385857cc2998304d0270a98813 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 27 Dec 2007 23:32:05 -0600 Subject: r26617: Load smb.conf. (This used to be commit 3f7bfef195421083f1401a73f60c5d270a1455f8) --- source4/lib/ldb/tests/python/ldap.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'source4/lib/ldb') diff --git a/source4/lib/ldb/tests/python/ldap.py b/source4/lib/ldb/tests/python/ldap.py index 898a7336ad..2b5f43920c 100755 --- a/source4/lib/ldb/tests/python/ldap.py +++ b/source4/lib/ldb/tests/python/ldap.py @@ -12,6 +12,7 @@ import samba.getopt as options from auth import system_session from samba import Ldb +import param parser = optparse.OptionParser("ldap [options] ") parser.add_option_group(options.SambaOptions(parser)) @@ -28,6 +29,10 @@ if len(args) < 1: host = args[0] +lp = param.LoadParm() +if opts.configfile: + lp.load(opts.configfile) + def assertEquals(a1, a2): assert a1 == a2 @@ -951,7 +956,8 @@ def find_schemadn(ldb): return res[0].schemaNamingContext -ldb = Ldb("ldap://%s" % host, credentials=creds, session_info=system_session()) +ldb = Ldb("ldap://%s" % host, credentials=creds, session_info=system_session(), + lp=lp) base_dn = find_basedn(ldb) configuration_dn = find_configurationdn(ldb) @@ -960,7 +966,7 @@ schema_dn = find_schemadn(ldb) print "baseDN: %s\n" % base_dn gc_ldb = Ldb("ldap://%s:3268" % host, credentials=creds, - session_info=system_session()) + session_info=system_session(), lp=lp) basic_tests(ldb, gc_ldb, base_dn, configuration_dn, schema_dn) basedn_tests(ldb, gc_ldb) -- cgit