summaryrefslogtreecommitdiff
path: root/source4/dsdb/tests/python
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamenim@samba.org>2010-09-26 00:18:35 +0300
committerKamen Mazdrashki <kamenim@samba.org>2010-09-26 02:25:12 +0300
commit04826b65f6699bb6455aa1f2800a26400567d339 (patch)
tree5f4b96b7ca5a0945e783e9cfc7199ce8965c8b71 /source4/dsdb/tests/python
parent7a7068f2ed6a21e6eab06021a3262217fe0afaf8 (diff)
downloadsamba-04826b65f6699bb6455aa1f2800a26400567d339.tar.gz
samba-04826b65f6699bb6455aa1f2800a26400567d339.tar.bz2
samba-04826b65f6699bb6455aa1f2800a26400567d339.zip
s4-sec_descriptor.py: Fix usage of 'paged_search' module for remote LDB connections
Diffstat (limited to 'source4/dsdb/tests/python')
-rwxr-xr-xsource4/dsdb/tests/python/sec_descriptor.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/source4/dsdb/tests/python/sec_descriptor.py b/source4/dsdb/tests/python/sec_descriptor.py
index 8dc77321b4..6748883474 100755
--- a/source4/dsdb/tests/python/sec_descriptor.py
+++ b/source4/dsdb/tests/python/sec_descriptor.py
@@ -1964,7 +1964,15 @@ if not "://" in host:
else:
host = "ldap://%s" % host
-ldb = SamDB(host, credentials=creds, session_info=system_session(), lp=lp, options=["modules:paged_searches"])
+# use 'paged_search' module when connecting remotely
+if host.lower().startswith("ldap://"):
+ ldb_options = ["modules:paged_searches"]
+
+ldb = SamDB(host,
+ credentials=creds,
+ session_info=system_session(),
+ lp=lp,
+ options=ldb_options)
runner = SubunitTestRunner()
rc = 0