ldb: Save a copy of the index result before calling the callbacks.
commit5c1d9b0b9acd5f4a1d2030f23829183cbbeb072d
authorAndrew Bartlett <abartlet@samba.org>
Mon, 28 May 2018 01:01:18 +0000 (28 13:01 +1200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 26 Jun 2018 07:19:16 +0000 (26 09:19 +0200)
tree84eab9c1bda2449a2853c07ae32b1b379e96b2c5
parent8b32d297f12ff16bb4139afd0a16548a27ed39b9
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>
(cherry picked from commit d02cd236dcbd8a44ecc85d1f7e95a48c95c0a479)
lib/ldb/ldb_tdb/ldb_index.c
lib/ldb/tests/ldb_mod_op_test.c