diff options
author | Stefan Metzmacher <metze@samba.org> | 2019-02-25 15:35:22 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2019-03-14 02:12:20 +0000 |
commit | e388e599495b6d7c38b8b6966332e27f8b958783 (patch) | |
tree | 67bcd34f6ecdcd82ea7c678c7d1eb25e48e76a28 /python/samba | |
parent | 6d50ee74920c39cdb18b427bfaaf200775bf2d73 (diff) | |
download | samba-e388e599495b6d7c38b8b6966332e27f8b958783.tar.gz |
dbcheck: don't remove dangling one-way links on already deleted objects
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.
In this case the lastKnownParent attributes points a non existing
object.
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>
Diffstat (limited to 'python/samba')
-rw-r--r-- | python/samba/dbchecker.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/python/samba/dbchecker.py b/python/samba/dbchecker.py index f9a11af9df1..35cff3668f2 100644 --- a/python/samba/dbchecker.py +++ b/python/samba/dbchecker.py @@ -571,6 +571,19 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base))) def err_missing_target_dn_or_GUID(self, dn, attrname, val, dsdb_dn): """handle a missing target DN (if specified, GUID form can't be found, and otherwise DN string form can't be found)""" + + # Don't change anything if the object itself is deleted + if str(dn).find('\\0ADEL') != -1: + # We don't bump the error count as Samba produces these + # in normal operation + self.report("WARNING: no target object found for GUID " + "component link %s in deleted object " + "%s - %s" % (attrname, dn, val)) + self.report("Not removing dangling one-way " + "link on deleted object " + "(tombstone garbage collection in progress?)") + return 0 + # check if its a backlink linkID, _ = self.get_attr_linkID_and_reverse_name(attrname) if (linkID & 1 == 0) and str(dsdb_dn).find('\\0ADEL') == -1: |