diff options
author | Stefan Metzmacher <metze@samba.org> | 2019-02-25 15:35:22 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2019-04-02 09:10:52 +0000 |
commit | a47b27b2c96a7823f5283b3a523c8eed71653e02 (patch) | |
tree | d94c531c0089514839e1aa8287c1da1505625504 /python | |
parent | 0c2f7224e075538fc0fd70e4405cafc82f037909 (diff) | |
download | samba-a47b27b2c96a7823f5283b3a523c8eed71653e02.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>
(cherry picked from commit e388e599495b6d7c38b8b6966332e27f8b958783)
Diffstat (limited to 'python')
-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 d6fe261c2b5..31538de7ea6 100644 --- a/python/samba/dbchecker.py +++ b/python/samba/dbchecker.py @@ -569,6 +569,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: |