summaryrefslogtreecommitdiff
path: root/libds
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-01-29 18:21:09 +0100
committerVolker Lendecke <vl@samba.org>2010-02-01 15:06:29 +0100
commit531059696e17d1ee538310d81af309c107d08e3e (patch)
treec33befb379b9237bb82b8f4340ee81d5e3488ee1 /libds
parent42f512552190396f69404a135d19e4325bde7d16 (diff)
downloadsamba-531059696e17d1ee538310d81af309c107d08e3e.tar.gz
samba-531059696e17d1ee538310d81af309c107d08e3e.tar.bz2
samba-531059696e17d1ee538310d81af309c107d08e3e.zip
tdb: fix an early release of the global lock that can cause data corruption
There was a bug in tdb where the tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1); (ending the transaction-"mutex") was done before the /* remove the recovery marker */ This means that when a transaction is committed there is a window where another opener of the file sees the transaction marker while the transaction committer is still fully functional and working on it. This led to transaction being rolled back by that second opener of the file while transaction_commit() gave no error to the caller. This patch moves the F_UNLCK to after the recovery marker was removed, closing this window.
Diffstat (limited to 'libds')
0 files changed, 0 insertions, 0 deletions