summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/locking/brlock.c2
-rw-r--r--source3/locking/locking.c7
2 files changed, 4 insertions, 5 deletions
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index 341d00f3fe..940dfbff8f 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -265,7 +265,7 @@ void brl_init(bool read_only)
}
brlock_db = db_open(NULL, lock_path("brlock.tdb"),
lp_open_files_db_hash_size(),
- TDB_DEFAULT | TDB_CLEAR_IF_FIRST,
+ TDB_DEFAULT|TDB_VOLATILE|TDB_CLEAR_IF_FIRST,
read_only?O_RDONLY:(O_RDWR|O_CREAT), 0644 );
if (!brlock_db) {
DEBUG(0,("Failed to open byte range locking database %s\n",
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index 513bb31d9d..782e10fb7c 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -392,10 +392,9 @@ static bool locking_init_internal(bool read_only)
if (lock_db)
return True;
- lock_db = db_open(NULL, lock_path("locking.tdb"), 0,
- TDB_DEFAULT
- |TDB_VOLATILE
- |(read_only?0x0:TDB_CLEAR_IF_FIRST),
+ lock_db = db_open(NULL, lock_path("locking.tdb"),
+ lp_open_files_db_hash_size(),
+ TDB_DEFAULT|TDB_VOLATILE|TDB_CLEAR_IF_FIRST,
read_only?O_RDONLY:O_RDWR|O_CREAT, 0644);
if (!lock_db) {