dbwrap_rbt: add nested traverse protection
authorStefan Metzmacher <metze@samba.org>
Wed, 25 Nov 2015 08:22:08 +0000 (09:22 +0100)
committerKarolin Seeger <kseeger@samba.org>
Mon, 11 Jan 2016 10:21:09 +0000 (11:21 +0100)
commit4a0f277c00f8a7a82f48e9a3eb284c434bf23295
treefa6834e2e8076120ec01fabbfefa625dd65583f6
parenta9071dcf8a7eec7c2f45fd17fc8b37367377e2d7
dbwrap_rbt: add nested traverse protection

Multiple dbwrap_traverse_read() calls are possible.

store() and delete() on a fetch locked record
are rejected during dbwrap_traverse_read().

A dbwrap_traverse() within a dbwrap_traverse_read()
behaves like a dbwrap_traverse_read().

Nested dbwrap_traverse() calls are not possible.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 590507951fc514a679f44b8bfdd03c721189c3fa)
lib/dbwrap/dbwrap_rbt.c