drs: Check target object is known after applying objects
commit67617d470028b45c722c598944a17591cab1e6ba
authorTim Beale <timbeale@catalyst.net.nz>
Thu, 15 Jun 2017 02:09:27 +0000 (15 14:09 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 18 Aug 2017 04:07:12 +0000 (18 06:07 +0200)
tree1b6d3736b08bf450fbd230b784781791fab5145c
parentf69596cd21d8106afdf494f39d1fcebea2b0f5dd
drs: Check target object is known after applying objects

Currently we only check that the target object is known at the end of
the transaction (i.e. the .prepare_commit hook). It's too late at this
point to resend the request with GET_TGT. Move this processing earlier
on, after we've applied all the objects (i.e. off the .extended hook).

In reality, we need to perform the checks at both points. I've
split the common code that gets the source/target details out of the
la_entry into a helper function. It's not the greatest function ever,
but seemed to make more sense than duplicating the code.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12972
source4/dsdb/repl/replicated_objects.c
source4/dsdb/samdb/ldb_modules/repl_meta_data.c