dbcheck: detect the change after deletion bug
authorStefan Metzmacher <metze@samba.org>
Thu, 28 Feb 2019 17:22:18 +0000 (18:22 +0100)
committerKarolin Seeger <kseeger@samba.org>
Thu, 28 Mar 2019 08:35:21 +0000 (08:35 +0000)
commit107883dff6cc42489169035dc36bfdf313cce4d7
tree618f20dedcb2afe59f711528c54593c89a227362
parent860b04aa7ae7ea700c7ff23bb08f6d6642cfa135
dbcheck: detect the change after deletion bug

Old versions of 'samba-tool dbcheck' could reanimate
deleted objects, when running at the same time as the
tombstone garbage collection.

When the (deleted) parent of a deleted object
(with the DISALLOW_MOVE_ON_DELETE bit in systemFlags),
is removed before the object itself, dbcheck moved
it in the LostAndFound[Config] subtree of the partition
as an originating change. That means that the object
will be in tombstone state again for 180 days on the local
DC. And other DCs fail to replicate the object as
it's already removed completely there and the replication
only gives the name and lastKnownParent attributes, because
all other attributes should already be known to the other DC.

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 a1658b306d85452407388b91a745078c9c1f7dc7)
python/samba/dbchecker.py
selftest/knownfail.d/dbcheck-list-deleted [deleted file]
source4/selftest/provisions/release-4-5-0-pre1/expected-dbcheck-link-output-lost-deleted-user2.txt