summaryrefslogtreecommitdiff
path: root/source3/locking
diff options
context:
space:
mode:
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"));