replmd: Only modify the object if it actually changed
authorTim Beale <timbeale@catalyst.net.nz>
Sun, 11 Nov 2018 22:00:52 +0000 (11:00 +1300)
committerTim Beale <timbeale@samba.org>
Wed, 21 Nov 2018 00:51:11 +0000 (01:51 +0100)
commitc371fef58638a7570becf29dd0df651004219d0a
treec14586545b66662dcd040d56d9de9874ebc8d075
parentcb3520fbaf9413da71645e653f9501d1645405b4
replmd: Only modify the object if it actually changed

Commit 775054afbe1512 reworked replmd_process_link_attribute() so that
we batch together DB operations for the same source object. However, it
was possible that the object had not actually changed at all, e.g.
- link was already processed by critical-objects-only during join, or
- we were doing a full-sync and processing info that was already
  up-to-date in our DB.

In these cases we modified the object anyway, even though nothing had
changed. This patch fixes it up, so we check that the object has
actually changed before modifying the DB.

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