summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules
diff options
context:
space:
mode:
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r--source4/dsdb/samdb/ldb_modules/tests/samba3sam.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/tests/samba3sam.py b/source4/dsdb/samdb/ldb_modules/tests/samba3sam.py
index 2478043eb4..a46afb1a72 100644
--- a/source4/dsdb/samdb/ldb_modules/tests/samba3sam.py
+++ b/source4/dsdb/samdb/ldb_modules/tests/samba3sam.py
@@ -29,6 +29,7 @@ from samba import Ldb, substitute_var
from samba.tests import LdbTestCase, TestCaseInTempDir, cmdline_loadparm
import samba.dcerpc.security
import samba.ndr
+from samba.auth import system_session
datadir = os.path.join(os.path.dirname(__file__),
"../../../../../testdata/samba3")
@@ -75,7 +76,7 @@ class MapBaseTestCase(TestCaseInTempDir):
"""Simple helper class that contains data for a specific SAM
connection."""
def __init__(self, basedn, dn):
- self.db = Ldb(lp=cmdline_loadparm)
+ self.db = Ldb(lp=cmdline_loadparm, session_info=system_session())
self.basedn = basedn
self.basedn_casefold = ldb.Dn(self.db, basedn).get_casefold()
self.substvars = {"BASEDN": self.basedn}
@@ -124,13 +125,13 @@ class Samba3SamTestCase(MapBaseTestCase):
def setUp(self):
super(Samba3SamTestCase, self).setUp()
- ldb = Ldb(self.ldburl, lp=cmdline_loadparm)
+ ldb = Ldb(self.ldburl, lp=cmdline_loadparm, session_info=system_session())
self.samba3.setup_data("samba3.ldif")
ldif = read_datafile("provision_samba3sam.ldif")
ldb.add_ldif(self.samba4.subst(ldif))
self.setup_modules(ldb, self.samba3, self.samba4)
del ldb
- self.ldb = Ldb(self.ldburl, lp=cmdline_loadparm)
+ self.ldb = Ldb(self.ldburl, lp=cmdline_loadparm, session_info=system_session())
def test_search_non_mapped(self):
"""Looking up by non-mapped attribute"""
@@ -291,12 +292,12 @@ class MapTestCase(MapBaseTestCase):
def setUp(self):
super(MapTestCase, self).setUp()
- ldb = Ldb(self.ldburl, lp=cmdline_loadparm)
+ ldb = Ldb(self.ldburl, lp=cmdline_loadparm, session_info=system_session())
ldif = read_datafile("provision_samba3sam.ldif")
ldb.add_ldif(self.samba4.subst(ldif))
self.setup_modules(ldb, self.samba3, self.samba4)
del ldb
- self.ldb = Ldb(self.ldburl, lp=cmdline_loadparm)
+ self.ldb = Ldb(self.ldburl, lp=cmdline_loadparm, session_info=system_session())
def test_map_search(self):
"""Running search tests on mapped data."""