ldb: Save a copy of the index result before calling the callbacks.
authorAndrew Bartlett <abartlet@samba.org>
Mon, 28 May 2018 01:01:18 +0000 (13:01 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 30 May 2018 02:23:27 +0000 (04:23 +0200)
commitd02cd236dcbd8a44ecc85d1f7e95a48c95c0a479
treec50e308ee7b162dcd445c10a6edec55fe64c23a6
parent41d8c563089ac67863c7e48df6a8c92a5724a1be
ldb: Save a copy of the index result before calling the callbacks.

Otherwise Samba modules like subtree_rename can fail as they modify the
index during the callback.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
lib/ldb/ldb_tdb/ldb_index.c
lib/ldb/tests/ldb_mod_op_test.c