From a6686b9f9893c67534c7eec73a6c301f1ebe41da Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Sun, 13 Nov 2011 13:15:47 +0100 Subject: [PATCH] samba-tool: dbcheck avoid problems with deleted objects We have to search for deleted objects as well as the previous search might have been done with the show_deleted control. If not samba-tool fails with no such DN error while fetching the object. --- source4/scripting/python/samba/dbchecker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source4/scripting/python/samba/dbchecker.py b/source4/scripting/python/samba/dbchecker.py index 7d85adfd16d..384e5d96c14 100644 --- a/source4/scripting/python/samba/dbchecker.py +++ b/source4/scripting/python/samba/dbchecker.py @@ -407,7 +407,7 @@ class dbcheck(object): attrs.append("replPropertyMetaData") res = self.samdb.search(base=dn, scope=ldb.SCOPE_BASE, - controls=["extended_dn:1:1", "show_recycled:1"], + controls=["extended_dn:1:1", "show_recycled:1", "show_deleted:1"], attrs=attrs) if len(res) != 1: self.report("Object %s disappeared during check" % dn) -- 2.34.1