s4-drepl: Ensure that the op->source does not get deallocated too early
authorAndrew Bartlett <abartlet@samba.org>
Thu, 21 Jun 2012 23:42:02 +0000 (09:42 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Sun, 24 Jun 2012 13:46:09 +0000 (23:46 +1000)
commit73a33be036fd7a903c9fecf077534cafe360e427
tree8d5bc659bb630c81b9c67f229bb73dd15ba5d73b
parent763f9e82010e4ff1c74aea651e3244063bbf7fbf
s4-drepl: Ensure that the op->source does not get deallocated too early

We need to have the struct dreplsrv_partition_source_dsa around until the end of the
async op, so we use talloc_reference after carefully checking the callers and
making the modifications required.

This prevents a crash when replicating partitions in the vampire_dc test after
adding DNS replication at join time.

Andrew Bartlett
source4/dsdb/repl/drepl_extended.c
source4/dsdb/repl/drepl_out_pull.c