summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-11-27 06:35:12 +0000
committerAndrew Tridgell <tridge@samba.org>2000-11-27 06:35:12 +0000
commitfb3daf365355d26d9c0c52353232a9d944a4212f (patch)
treec5b519ae7faa35ceb99cf8d9dddc34f78db910f4 /source3
parentefb7bb3bcff6437593e0c9b9655e018f94fe9639 (diff)
downloadsamba-fb3daf365355d26d9c0c52353232a9d944a4212f.tar.gz
samba-fb3daf365355d26d9c0c52353232a9d944a4212f.tar.bz2
samba-fb3daf365355d26d9c0c52353232a9d944a4212f.zip
fixed a potential locking deadlock in tdb
(This used to be commit 03453e2ae557d7fa119338b71744822093d2f38a)
Diffstat (limited to 'source3')
-rw-r--r--source3/tdb/tdb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/tdb/tdb.c b/source3/tdb/tdb.c
index 45cbaf73ed..97cbba67cc 100644
--- a/source3/tdb/tdb.c
+++ b/source3/tdb/tdb.c
@@ -761,7 +761,7 @@ int tdb_traverse(TDB_CONTEXT *tdb, int (*fn)(TDB_CONTEXT *tdb, TDB_DATA key, TDB
/* loop over all hash chains */
for (h = 0; h < tdb->header.hash_size; h++) {
- tdb_lock(tdb, BUCKET(h), F_RDLCK);
+ tdb_lock(tdb, BUCKET(h), F_WRLCK);
/* read in the hash top */
offset = tdb_hash_top(tdb, h);