mirror of
https://github.com/samba-team/samba.git
synced 2025-07-27 07:42:04 +03:00
samba-tool: cope with GC compares in ldapcmp
the two base DNs do not need to match when doing GC replica compares
This commit is contained in:
@ -817,9 +817,11 @@ class LDAPBundel(object):
|
||||
self.search_scope = SCOPE_ONELEVEL
|
||||
else:
|
||||
raise StandardError("Wrong 'scope' given. Choose from: SUB, ONE, BASE")
|
||||
if not self.search_base.upper().endswith(search_base.upper()):
|
||||
raise StandardError("Invalid search base specified: %s" % self.search_base)
|
||||
res = self.con.ldb.search(base=self.search_base, scope=self.search_scope, attrs=["dn"])
|
||||
try:
|
||||
res = self.con.ldb.search(base=self.search_base, scope=self.search_scope, attrs=["dn"])
|
||||
except LdbError, (enum, estr):
|
||||
print("Failed search of base=%s" % self.search_base)
|
||||
raise
|
||||
for x in res:
|
||||
dn_list.append(x["dn"].get_linearized())
|
||||
#
|
||||
|
Reference in New Issue
Block a user