1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00

lib: Allow DBWRAP_LOCK_ORDER_NONE in db_open()

locking.tdb will not have a LOCK_ORDER anymore, this will be done by
the code in g_lock.c. We need to allow opening a database with dbwrap
without having a lock order.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2019-11-21 15:20:33 +01:00 committed by Jeremy Allison
parent 5ae58cd0db
commit 66d62ed797

View File

@ -67,7 +67,8 @@ struct db_context *db_open(TALLOC_CTX *mem_ctx,
const char *base;
struct loadparm_context *lp_ctx = NULL;
if (!DBWRAP_LOCK_ORDER_VALID(lock_order)) {
if ((lock_order != DBWRAP_LOCK_ORDER_NONE) &&
!DBWRAP_LOCK_ORDER_VALID(lock_order)) {
errno = EINVAL;
return NULL;
}