1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-28 11:42:03 +03:00

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>
This commit is contained in:
Stefan Metzmacher
2019-02-25 15:35:22 +01:00
committed by Andrew Bartlett
parent 9afcd5331c
commit 6d50ee7492
3 changed files with 10 additions and 8 deletions

View File

@ -2401,8 +2401,13 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
except ldb.LdbError as e11:
(enum, estr) = e11.args
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