s4-sec_descriptor.py: Fix usage of 'paged_search' module for remote LDB connections
authorKamen Mazdrashki <kamenim@samba.org>
Sat, 25 Sep 2010 21:18:35 +0000 (00:18 +0300)
committerKamen Mazdrashki <kamenim@samba.org>
Sat, 25 Sep 2010 23:25:12 +0000 (02:25 +0300)
source4/dsdb/tests/python/sec_descriptor.py

index 8dc77321b4193a9d23c30e578c1dabf084615c0a..6748883474c77cf54d16918f03b43261474db0ae 100755 (executable)
@@ -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