summaryrefslogtreecommitdiff
path: root/source4/dsdb/tests/python/passwords.py
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-19 09:07:53 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-19 12:07:06 +0100
commit8b7f23d644f2c9a0e5eeffeb2f93786c54a43afe (patch)
tree728273e656926ae18cc5a3da4cdae1cb411fa81b /source4/dsdb/tests/python/passwords.py
parent5855194894535c57797a0475640e50c07ed92643 (diff)
downloadsamba-8b7f23d644f2c9a0e5eeffeb2f93786c54a43afe.tar.gz
samba-8b7f23d644f2c9a0e5eeffeb2f93786c54a43afe.tar.bz2
samba-8b7f23d644f2c9a0e5eeffeb2f93786c54a43afe.zip
s4:dsdb tests - use even more already defined pyldb functions to retrieve NCs
Diffstat (limited to 'source4/dsdb/tests/python/passwords.py')
-rwxr-xr-xsource4/dsdb/tests/python/passwords.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/source4/dsdb/tests/python/passwords.py b/source4/dsdb/tests/python/passwords.py
index f238c1adc4..461d135003 100755
--- a/source4/dsdb/tests/python/passwords.py
+++ b/source4/dsdb/tests/python/passwords.py
@@ -926,15 +926,10 @@ if not "://" in host:
ldb = SamDB(url=host, session_info=system_session(), credentials=creds, lp=lp)
-# Gets back the configuration basedn
-res = ldb.search(base="", expression="", scope=SCOPE_BASE,
- attrs=["configurationNamingContext"])
-configuration_dn = res[0]["configurationNamingContext"][0]
-
# Gets back the basedn
-res = ldb.search(base="", expression="", scope=SCOPE_BASE,
- attrs=["defaultNamingContext"])
-base_dn = res[0]["defaultNamingContext"][0]
+base_dn = ldb.domain_dn()
+# Gets back the configuration basedn
+configuration_dn = ldb.get_config_basedn().get_linearized()
# Get the old "dSHeuristics" if it was set
res = ldb.search("CN=Directory Service, CN=Windows NT, CN=Services, "