1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-01 04:58:35 +03:00

dbwrap: Fix "use mmap = no"

Mutexes require mmap.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Apr 12 23:04:18 CEST 2018 on sn-devel-144
This commit is contained in:
Volker Lendecke 2018-04-11 08:01:38 +02:00
parent 40edd1bc27
commit 23d841036d

View File

@ -111,6 +111,15 @@ struct db_context *db_open(TALLOC_CTX *mem_ctx,
try_mutex = lp_parm_bool(-1, "dbwrap_tdb_mutexes", "*", try_mutex);
try_mutex = lp_parm_bool(-1, "dbwrap_tdb_mutexes", base, try_mutex);
if (!lp_use_mmap()) {
/*
* Mutexes require mmap. "use mmap = no" can
* be a debugging tool, so let it override the
* mutex parameters
*/
try_mutex = false;
}
if (try_mutex && tdb_runtime_check_for_robust_mutexes()) {
tdb_flags |= TDB_MUTEX_LOCKING;
}