From 9313580a12e2252693205470d72d5814ee81d40b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 28 Mar 2013 11:04:31 +0100 Subject: [PATCH] s3:lib/server_mutex: open mutex.tdb with CLEAR_IF_FIRST /var/lock/samba is typically on tpmfs. Signed-off-by: Stefan Metzmacher Reviewed-by: Volker Lendecke (cherry picked from commit 821171e422133d64e7c07b4d610984c33cd23244) --- source3/lib/server_mutex.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source3/lib/server_mutex.c b/source3/lib/server_mutex.c index 619fbd0..38bf2ca 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", -- 1.7.10.4