replmd: Handle conflicts for single-valued link attributes better
authorTim Beale <timbeale@catalyst.net.nz>
Wed, 27 Sep 2017 00:44:29 +0000 (13:44 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 20 Oct 2017 02:05:21 +0000 (04:05 +0200)
commitf196897bc822f7133627477e77a4bcd98b8ceda6
tree8c124e1aeccdcce5f72ed871953a2525a7608f04
parent70d532a5c79dc386bf55db1d32865044872a6905
replmd: Handle conflicts for single-valued link attributes better

If 2 DCs independently set a single-valued linked attribute to differing
values, Samba should be able to resolve this problem when replication
occurs.

If the received information is better, then we want to set the existing
link attribute in our DB as inactive.

If our own information is better, then we still want to add the received
link attribute, but mark it as inactive so that it doesn't clobber our
own link.

This still isn't a complete solution. When we add the received attribute
as inactive, we really should be incrementing the version, updating the
USN, etc. Also this only deals with the case where the received link is
completely new (i.e. a received link conflicting with an existing
inactive link isn't handled).

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13055

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
selftest/knownfail.d/link_conflicts
source4/dsdb/samdb/ldb_modules/repl_meta_data.c