[SCM] Samba Shared Repository - branch master updated
Kamen Mazdrashki
kamenim at samba.org
Sat Sep 25 18:57:04 MDT 2010
The branch, master has been updated
via f1b3c4d s4-possibleinferiors.py: Fix usage of 'paged_search' module for remote LDB connections
via 1178560 s4-fsmo.py: Fix usage of 'paged_search' module for remote LDB connections
via cf57771 s4-delete_object.py: Fix usage of 'paged_search' module for remote LDB connections
via 04826b6 s4-sec_descriptor.py: Fix usage of 'paged_search' module for remote LDB connections
via 7a7068f s4-ldap_schema.py: Remove unused LDB connection to GC port
via 8780d29 s4-dsdb_schema_info.py: Fix usage of 'paged_search' module for remote LDB connections
via 7e1e7b1 s4-ldapcmp: Fix usage of 'paged_search' module for remote LDB connections
via 9e6fa85 s4-ldapcmp: Extend ldapcmp to be able to compare more than one context at a time
from dda1dd6 s3: Avoid an explicit ZERO_STRUCT
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit f1b3c4dd387ac04615c3443d5de1059d2dc59ba4
Author: Kamen Mazdrashki <kamenim at samba.org>
Date: Sun Sep 26 02:13:39 2010 +0300
s4-possibleinferiors.py: Fix usage of 'paged_search' module for remote LDB connections
commit 11785600be99f3a5b6edeef6f9efe4898abeb3d8
Author: Kamen Mazdrashki <kamenim at samba.org>
Date: Sun Sep 26 00:21:19 2010 +0300
s4-fsmo.py: Fix usage of 'paged_search' module for remote LDB connections
commit cf5777111616a2f5239b19b5b95974dd47136c48
Author: Kamen Mazdrashki <kamenim at samba.org>
Date: Sun Sep 26 00:20:20 2010 +0300
s4-delete_object.py: Fix usage of 'paged_search' module for remote LDB connections
commit 04826b65f6699bb6455aa1f2800a26400567d339
Author: Kamen Mazdrashki <kamenim at samba.org>
Date: Sun Sep 26 00:18:35 2010 +0300
s4-sec_descriptor.py: Fix usage of 'paged_search' module for remote LDB connections
commit 7a7068f2ed6a21e6eab06021a3262217fe0afaf8
Author: Kamen Mazdrashki <kamenim at samba.org>
Date: Sun Sep 26 00:13:39 2010 +0300
s4-ldap_schema.py: Remove unused LDB connection to GC port
commit 8780d2934bee14664e44643f70c90b609acda6b0
Author: Kamen Mazdrashki <kamenim at samba.org>
Date: Sun Sep 26 00:11:08 2010 +0300
s4-dsdb_schema_info.py: Fix usage of 'paged_search' module for remote LDB connections
commit 7e1e7b16f6c2184554c429e039227efd6c7ed839
Author: Kamen Mazdrashki <kamenim at samba.org>
Date: Sun Sep 26 00:10:24 2010 +0300
s4-ldapcmp: Fix usage of 'paged_search' module for remote LDB connections
commit 9e6fa8553cb7ca7fece76646c30f7fcb2a86a83a
Author: Kamen Mazdrashki <kamenim at samba.org>
Date: Sun Sep 26 02:25:03 2010 +0300
s4-ldapcmp: Extend ldapcmp to be able to compare more than one context at a time
If no arguments given, ldapcmp will compare all NCs
-----------------------------------------------------------------------
Summary of changes:
.../samdb/ldb_modules/tests/possibleinferiors.py | 8 +++-
source4/dsdb/tests/python/dsdb_schema_info.py | 13 +++--
source4/dsdb/tests/python/ldap_schema.py | 5 --
source4/dsdb/tests/python/sec_descriptor.py | 10 +++-
source4/scripting/devel/ldapcmp | 58 ++++++++++++--------
source4/torture/drs/python/delete_object.py | 5 +-
source4/torture/drs/python/fsmo.py | 5 +-
7 files changed, 65 insertions(+), 39 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/dsdb/samdb/ldb_modules/tests/possibleinferiors.py b/source4/dsdb/samdb/ldb_modules/tests/possibleinferiors.py
index 3324d4b..c1e935f 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="",
diff --git a/source4/dsdb/tests/python/dsdb_schema_info.py b/source4/dsdb/tests/python/dsdb_schema_info.py
index ff3c7f9..893cd4c 100755
--- a/source4/dsdb/tests/python/dsdb_schema_info.py
+++ b/source4/dsdb/tests/python/dsdb_schema_info.py
@@ -203,11 +203,12 @@ if not "://" in ldb_url:
ldb_url = "tdb://%s" % ldb_url
else:
ldb_url = "ldap://%s" % ldb_url
- # user 'paged_search' module when connecting remotely
- ldb_options = ["modules:paged_searches"]
+# use 'paged_search' module when connecting remotely
+if ldb_url.lower().startswith("ldap://"):
+ ldb_options = ["modules:paged_searches"]
ldb = SamDB(url=ldb_url,
- lp=samba.tests.env_loadparm(),
- session_info=system_session(),
- credentials=samba.tests.cmdline_credentials,
- options=ldb_options)
+ lp=samba.tests.env_loadparm(),
+ session_info=system_session(),
+ credentials=samba.tests.cmdline_credentials,
+ options=ldb_options)
diff --git a/source4/dsdb/tests/python/ldap_schema.py b/source4/dsdb/tests/python/ldap_schema.py
index 4f17dd8..171d6d1 100755
--- a/source4/dsdb/tests/python/ldap_schema.py
+++ b/source4/dsdb/tests/python/ldap_schema.py
@@ -528,11 +528,6 @@ if host.startswith("ldap://"):
ldb_options = ["modules:paged_searches"]
ldb = Ldb(host, credentials=creds, session_info=system_session(), lp=lp, options=ldb_options)
-if not "tdb://" in host:
- gc_ldb = Ldb("%s:3268" % host, credentials=creds,
- session_info=system_session(), lp=lp)
-else:
- gc_ldb = None
runner = SubunitTestRunner()
rc = 0
diff --git a/source4/dsdb/tests/python/sec_descriptor.py b/source4/dsdb/tests/python/sec_descriptor.py
index 8dc7732..6748883 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
diff --git a/source4/scripting/devel/ldapcmp b/source4/scripting/devel/ldapcmp
index 689c202..74a22bf 100755
--- a/source4/scripting/devel/ldapcmp
+++ b/source4/scripting/devel/ldapcmp
@@ -50,8 +50,9 @@ class LDAPBase(object):
samdb_url = "tdb://%s" % host
else:
samdb_url = "ldap://%s:389" % host
- # user 'paged_search' module when connecting remotely
- ldb_options = ["modules:paged_searches"]
+ # use 'paged_search' module when connecting remotely
+ if samdb_url.lower().startswith("ldap://"):
+ ldb_options = ["modules:paged_searches"]
self.ldb = Ldb(url=samdb_url,
credentials=creds,
lp=lp,
@@ -445,7 +446,7 @@ class LDAPBundel(object):
other.update_size()
assert self.size == other.size
assert sorted([x.upper() for x in self.dn_list]) == sorted([x.upper() for x in other.dn_list])
- self.log( "\n* Objets to be compared: %s" % self.size )
+ self.log( "\n* Objects to be compared: %s" % self.size )
index = 0
while index < self.size:
@@ -552,8 +553,16 @@ if __name__ == "__main__":
if creds.is_anonymous():
parser.error("You must supply at least one username/password pair")
- if not (len(args) == 1 and args[0].upper() in ["DOMAIN", "CONFIGURATION", "SCHEMA"]):
- parser.error("Incorrect arguments")
+ # make a list of contexts to compare in
+ contexts = []
+ if len(args) == 0:
+ # if no argument given, we compare all contexts
+ contexts = ["DOMAIN", "CONFIGURATION", "SCHEMA"]
+ else:
+ for context in args:
+ if not context.upper() in ["DOMAIN", "CONFIGURATION", "SCHEMA"]:
+ parser.error("Incorrect argument: %s" % context)
+ contexts.append(context.upper())
if opts.verbose and opts.quiet:
parser.error("You cannot set --verbose and --quiet together")
@@ -564,25 +573,30 @@ if __name__ == "__main__":
con2 = LDAPBase(opts.host2, opts, creds2, lp)
assert len(con2.base_dn) > 0
- b1 = LDAPBundel(con1, context=args[0], cmd_opts=opts)
- b2 = LDAPBundel(con2, context=args[0], cmd_opts=opts)
-
- if b1 == b2:
- if not opts.quiet:
- print "\n* Final result: SUCCESS"
- status = 0
- else:
+ status = 0
+ for context in contexts:
if not opts.quiet:
- print "\n* Final result: FAILURE"
- print "\nSUMMARY"
- print "---------"
- status = -1
+ print "\n* Comparing [%s] context..." % context
- assert len(b1.summary["df_value_attrs"]) == len(b2.summary["df_value_attrs"])
- b2.summary["df_value_attrs"] = []
+ b1 = LDAPBundel(con1, context=context, cmd_opts=opts)
+ b2 = LDAPBundel(con2, context=context, cmd_opts=opts)
- if not opts.quiet:
- b1.print_summary()
- b2.print_summary()
+ if b1 == b2:
+ if not opts.quiet:
+ print "\n* Result for [%s]: SUCCESS" % context
+ else:
+ if not opts.quiet:
+ print "\n* Result for [%s]: FAILURE" % context
+ print "\nSUMMARY"
+ print "---------"
+ # mark exit status as FAILURE if a least one comparison failed
+ status = -1
+
+ assert len(b1.summary["df_value_attrs"]) == len(b2.summary["df_value_attrs"])
+ b2.summary["df_value_attrs"] = []
+
+ if not opts.quiet:
+ b1.print_summary()
+ b2.print_summary()
sys.exit(status)
diff --git a/source4/torture/drs/python/delete_object.py b/source4/torture/drs/python/delete_object.py
index d494204..c8475e5 100644
--- a/source4/torture/drs/python/delete_object.py
+++ b/source4/torture/drs/python/delete_object.py
@@ -230,8 +230,9 @@ def connect_samdb(samdb_url):
samdb_url = "tdb://%s" % samdb_url
else:
samdb_url = "ldap://%s" % samdb_url
- # user 'paged_search' module when connecting remotely
- ldb_options = ["modules:paged_searches"]
+ # use 'paged_search' module when connecting remotely
+ if samdb_url.lower().startswith("ldap://"):
+ ldb_options = ["modules:paged_searches"]
return SamDB(url=samdb_url,
lp=samba.tests.env_loadparm(),
diff --git a/source4/torture/drs/python/fsmo.py b/source4/torture/drs/python/fsmo.py
index 9b13275..27107c1 100644
--- a/source4/torture/drs/python/fsmo.py
+++ b/source4/torture/drs/python/fsmo.py
@@ -166,8 +166,9 @@ def connect_samdb(samdb_url):
samdb_url = "tdb://%s" % samdb_url
else:
samdb_url = "ldap://%s:389" % samdb_url
- # user 'paged_search' module when connecting remotely
- ldb_options = ["modules:paged_searches"]
+ # use 'paged_search' module when connecting remotely
+ if samdb_url.lower().startswith("ldap://"):
+ ldb_options = ["modules:paged_searches"]
return SamDB(url=samdb_url,
lp=samba.tests.env_loadparm(),
--
Samba Shared Repository
More information about the samba-cvs
mailing list