summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-03-28 11:04:31 +0100
committerVolker Lendecke <vl@samba.org>2013-04-03 09:53:08 +0200
commit821171e422133d64e7c07b4d610984c33cd23244 (patch)
tree9dd73f6cdcf835e2e8bac00522e9cee399eaae2c /source3/lib
parent54529fd354275cfb4ece407f95ef34675b202ea3 (diff)
downloadsamba-821171e422133d64e7c07b4d610984c33cd23244.tar.gz
samba-821171e422133d64e7c07b4d610984c33cd23244.tar.bz2
samba-821171e422133d64e7c07b4d610984c33cd23244.zip
s3:lib/server_mutex: open mutex.tdb with CLEAR_IF_FIRST
/var/lock/samba is typically on tpmfs. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/server_mutex.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/lib/server_mutex.c b/source3/lib/server_mutex.c
index 41da0a1b01..c86047b439 100644
--- a/source3/lib/server_mutex.c
+++ b/source3/lib/server_mutex.c
@@ -69,7 +69,10 @@ struct named_mutex *grab_named_mutex(TALLOC_CTX *mem_ctx, const char *name,
}
result->tdb = tdb_wrap_open(result, lock_path("mutex.tdb"), 0,
- TDB_DEFAULT, O_RDWR|O_CREAT, 0600, lp_ctx);
+ TDB_DEFAULT |
+ TDB_CLEAR_IF_FIRST |
+ TDB_INCOMPATIBLE_HASH,
+ O_RDWR|O_CREAT, 0600, lp_ctx);
talloc_unlink(result, lp_ctx);
if (result->tdb == NULL) {
DEBUG(1, ("Could not open mutex.tdb: %s\n",