From f1b3c4dd387ac04615c3443d5de1059d2dc59ba4 Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Sun, 26 Sep 2010 02:13:39 +0300 Subject: s4-possibleinferiors.py: Fix usage of 'paged_search' module for remote LDB connections --- source4/dsdb/samdb/ldb_modules/tests/possibleinferiors.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source4/dsdb/samdb/ldb_modules/tests/possibleinferiors.py b/source4/dsdb/samdb/ldb_modules/tests/possibleinferiors.py index 3324d4b7e2..c1e935f95c 100755 --- a/source4/dsdb/samdb/ldb_modules/tests/possibleinferiors.py +++ b/source4/dsdb/samdb/ldb_modules/tests/possibleinferiors.py @@ -59,7 +59,13 @@ def uniq_list(alist): lp_ctx = sambaopts.get_loadparm() creds = credopts.get_credentials(lp_ctx) -db = Ldb(url, credentials=creds, lp=lp_ctx, options=["modules:paged_searches"]) + +ldb_options = [] +# use 'paged_search' module when connecting remotely +if url.lower().startswith("ldap://"): + ldb_options = ["modules:paged_searches"] + +db = Ldb(url, credentials=creds, lp=lp_ctx, options=ldb_options) # get the rootDSE res = db.search(base="", expression="", -- cgit