summaryrefslogtreecommitdiff
path: root/source3/locking
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-08-26 19:27:18 +0000
committerJeremy Allison <jra@samba.org>2001-08-26 19:27:18 +0000
commit10c240ef977333e3ad0f340961c5d4a807d35144 (patch)
treeeda2fc7b4b4aff825c3e50a8e32ba24c034a9b6c /source3/locking
parentcee2b0dc2c55f659c84ed41d95f7459bc7764c33 (diff)
downloadsamba-10c240ef977333e3ad0f340961c5d4a807d35144.tar.gz
samba-10c240ef977333e3ad0f340961c5d4a807d35144.tar.bz2
samba-10c240ef977333e3ad0f340961c5d4a807d35144.zip
Don't use CLEAR_IF_FIRST if opening read-only.
Jeremy. (This used to be commit f5ba19c12989dd1e996473869468afcfc5dce72e)
Diffstat (limited to 'source3/locking')
-rw-r--r--source3/locking/brlock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index a642be317c..dc2f39e7d9 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -201,7 +201,7 @@ void brl_init(int read_only)
if (tdb)
return;
- tdb = tdb_open_log(lock_path("brlock.tdb"), 0, TDB_CLEAR_IF_FIRST|USE_TDB_MMAP_FLAG,
+ tdb = tdb_open_log(lock_path("brlock.tdb"), 0, USE_TDB_MMAP_FLAG|(read_only?0x0:TDB_CLEAR_IF_FIRST),
read_only?O_RDONLY:(O_RDWR|O_CREAT), 0644);
if (!tdb) {
DEBUG(0,("Failed to open byte range locking database\n"));