ldb_tdb: Do not make search or DB modifications without a lock
authorGary Lockyer <gary@catalyst.net.nz>
Thu, 22 Mar 2018 22:27:10 +0000 (11:27 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 3 May 2018 06:17:44 +0000 (08:17 +0200)
commit501b35f86199216c78e38b4e0bc8e985e417f95d
tree5384c9ec8b9011908169e1bb984e747c6189d878
parent39e5faa77c144b0c548d8afe749c1f08438b7e8f
ldb_tdb: Do not make search or DB modifications without a lock

The ldb_cache startup code would previously not take a read lock
nor a sufficiently wide write transaction.

The new code takes a read lock, and if it needs to write takes a
write lock (transaction) and re-reads before continuing.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
lib/ldb/ldb_tdb/ldb_cache.c