s4-possibleinferiors.py: Fix usage of 'paged_search' module for remote LDB connections
authorKamen Mazdrashki <kamenim@samba.org>
Sat, 25 Sep 2010 23:13:39 +0000 (02:13 +0300)
committerKamen Mazdrashki <kamenim@samba.org>
Sat, 25 Sep 2010 23:25:13 +0000 (02:25 +0300)
source4/dsdb/samdb/ldb_modules/tests/possibleinferiors.py

index 3324d4b7e2425f04c71837a88baaf57a1d4bd402..c1e935f95c4d97ce19ee73585fc06f5b1f64349f 100755 (executable)
@@ -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="",