From 04826b65f6699bb6455aa1f2800a26400567d339 Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Sun, 26 Sep 2010 00:18:35 +0300 Subject: s4-sec_descriptor.py: Fix usage of 'paged_search' module for remote LDB connections --- source4/dsdb/tests/python/sec_descriptor.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'source4') 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 -- cgit