diff options
author | Stefan Metzmacher <metze@samba.org> | 2019-02-25 15:35:22 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2019-03-28 12:19:12 +0000 |
commit | 0fd3f38c1cfa717c1e9a2d320030ee29102e5005 (patch) | |
tree | b23ad225a9d8f387f6bec4ee60a5ae06b0cf9fe1 /python | |
parent | ac900c23b5bc2fa8fe1bbb0b6f195fcd43ec491f (diff) | |
download | samba-0fd3f38c1cfa717c1e9a2d320030ee29102e5005.tar.gz |
dbcheck: don't move already deleted objects to LostAndFound
This would typically happen when the garbage collection
removed a parent object before a child object (both with
the DISALLOW_MOVE_ON_DELETE bit set in systemFlags),
while dbcheck is running at the same time as the garbage collection.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13816
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 6d50ee74920c39cdb18b427bfaaf200775bf2d73)
Diffstat (limited to 'python')
-rw-r--r-- | python/samba/dbchecker.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/python/samba/dbchecker.py b/python/samba/dbchecker.py index a7edb5ace53..560ad5485a2 100644 --- a/python/samba/dbchecker.py +++ b/python/samba/dbchecker.py @@ -2360,8 +2360,13 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base))) controls=["show_recycled:1", "show_deleted:1"]) except ldb.LdbError, (enum, estr): if enum == ldb.ERR_NO_SUCH_OBJECT: - self.err_missing_parent(obj) - error_count += 1 + if isDeleted: + self.report("WARNING: parent object not found for %s" % (obj.dn)) + self.report("Not moving to LostAndFound " + "(tombstone garbage collection in progress?)") + else: + self.err_missing_parent(obj) + error_count += 1 else: raise |