1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-25 17:57:42 +03:00

dbchecker: Stop ignoring linked cases where both objects are alive

Previously, this did nothing and the code was both untested and unused.

Removes the knownfail entry for dbcheck.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12600
(cherry picked from commit 0a7c6b56563faeafd61a620cb330349671bc9f3b)

Autobuild-User(v4-5-test): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(v4-5-test): Wed Mar  1 13:15:34 CET 2017 on sn-devel-144
This commit is contained in:
Garming Sam 2017-02-22 15:42:46 +13:00 committed by Stefan Metzmacher
parent 9f5b85e0dd
commit c479054b34
2 changed files with 13 additions and 11 deletions

View File

@ -645,10 +645,9 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
self.report("Not fixing missing backlink %s" % backlink_name)
return
m = ldb.Message()
m.dn = obj.dn
m['old_value'] = ldb.MessageElement(val, ldb.FLAG_MOD_DELETE, attrname)
m['new_value'] = ldb.MessageElement(val, ldb.FLAG_MOD_ADD, attrname)
if self.do_modify(m, ["show_recycled:1"],
m.dn = target_dn
m['new_value'] = ldb.MessageElement(val, ldb.FLAG_MOD_ADD, backlink_name)
if self.do_modify(m, ["show_recycled:1", "relax:0"],
"Failed to fix missing backlink %s" % backlink_name):
self.report("Fixed missing backlink %s" % (backlink_name))
@ -974,12 +973,16 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
if v_guid == obj_guid:
match_count += 1
if match_count != 1:
if target_is_deleted:
error_count += 1
if linkID & 1:
self.err_missing_backlink(obj, attrname, val, reverse_link_name, dsdb_dn.dn)
else:
self.err_orphaned_backlink(obj, attrname, val, reverse_link_name, dsdb_dn.dn)
error_count += 1
if linkID & 1:
# Backlink exists, but forward link does not
# Delete the hanging backlink
self.err_orphaned_backlink(obj, attrname, val, reverse_link_name, dsdb_dn.dn)
else:
# Forward link exists, but backlink does not
# Add the missing backlink (if the target object is not Deleted Objects?)
if not target_is_deleted:
self.err_missing_backlink(obj, attrname, obj.dn.extended_str(), reverse_link_name, dsdb_dn.dn)
continue

View File

@ -296,4 +296,3 @@
^samba4.drs.ridalloc_exop.python.*ridalloc_exop.DrsReplicaSyncTestCase.test_join_time_ridalloc
^samba4.drs.ridalloc_exop.python.*ridalloc_exop.DrsReplicaSyncTestCase.test_rid_set_dbcheck_after_seize
^samba4.drs.ridalloc_exop.python.*ridalloc_exop.DrsReplicaSyncTestCase.test_rid_set_dbcheck
^samba4.blackbox.dbcheck-links.release-4-5-0-pre1.dbcheck\(none\).*