mirror of
https://github.com/samba-team/samba.git
synced 2025-07-09 20:59:11 +03:00
s4:dsdb python stuff - introduce also here the "show_recycled" control
But also here beside "show_deleted" to not loose compatibility with older provisions. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
committed by
Matthias Dieter Wallnöfer
parent
e3081b92c1
commit
dda6c354f6
@ -166,7 +166,7 @@ class Ldb(_Ldb):
|
||||
# Delete the 'visible' records, and the invisble 'deleted' records (if this DB supports it)
|
||||
for msg in self.search(basedn, ldb.SCOPE_SUBTREE,
|
||||
"(&(|(objectclass=*)(distinguishedName=*))(!(distinguishedName=@BASEINFO)))",
|
||||
[], controls=["show_deleted:0"]):
|
||||
[], controls=["show_deleted:0", "show_recycled:0"]):
|
||||
try:
|
||||
self.delete(msg.dn, ["relax:0"])
|
||||
except ldb.LdbError, (errno, _):
|
||||
@ -175,7 +175,7 @@ class Ldb(_Ldb):
|
||||
raise
|
||||
|
||||
res = self.search(basedn, ldb.SCOPE_SUBTREE,
|
||||
"(&(|(objectclass=*)(distinguishedName=*))(!(distinguishedName=@BASEINFO)))", [], controls=["show_deleted:0"])
|
||||
"(&(|(objectclass=*)(distinguishedName=*))(!(distinguishedName=@BASEINFO)))", [], controls=["show_deleted:0", "show_recycled:0"])
|
||||
assert len(res) == 0
|
||||
|
||||
# delete the specials
|
||||
|
Reference in New Issue
Block a user