replmd: Move where we update the usnChanged/whenChanged
authorTim Beale <timbeale@catalyst.net.nz>
Sun, 11 Nov 2018 22:13:28 +0000 (11:13 +1300)
committerTim Beale <timbeale@samba.org>
Wed, 21 Nov 2018 00:51:11 +0000 (01:51 +0100)
commitf53954d0fd4d67c73336e9fda81429df9c55d77a
tree7cbc5bd74a38edcfd66abe980911d9e4f828980c
parentc371fef58638a7570becf29dd0df651004219d0a
replmd: Move where we update the usnChanged/whenChanged

Move this closer to where the source object actually gets modified.

The main reason to do this is that adding fields can cause the
msg->elements to be reallocated, which will invalidate all the
old_el and pdn_list pointers which are derived from the msg.

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