partition: Use a transaction to write and a read lock to read the LDB_METADATA_SEQ_NUM
authorAndrew Bartlett <abartlet@samba.org>
Thu, 1 Feb 2018 04:16:13 +0000 (17:16 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 5 Mar 2018 19:50:14 +0000 (20:50 +0100)
commit1265346f6c8ada27f2f0cf29a4f21a457fb6af00
tree2e7a565832374ae05e928d53a74c8c3652c54bb2
parentc59d5e11967b9b0afb16fcffc023c1437bf9ad21
partition: Use a transaction to write and a read lock to read the LDB_METADATA_SEQ_NUM

This is critical as otherwise we can read a sequence number in advance
of the data that it represents and so have a false cache.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
source4/dsdb/samdb/ldb_modules/partition.c
source4/dsdb/samdb/ldb_modules/partition_metadata.c