diff options
author | Volker Lendecke <vl@samba.org> | 2019-11-21 15:20:33 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2020-05-15 00:48:32 +0000 |
commit | 66d62ed7978cc0bc1d7bb6c495e32738802f4420 (patch) | |
tree | 3c77bc74ca930520a213961277f2b62c5325ada8 /source3/lib/dbwrap | |
parent | 5ae58cd0db34d6c406794fa2301df81d835c2ea8 (diff) | |
download | samba-66d62ed7978cc0bc1d7bb6c495e32738802f4420.tar.gz |
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>
Diffstat (limited to 'source3/lib/dbwrap')
-rw-r--r-- | source3/lib/dbwrap/dbwrap_open.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/lib/dbwrap/dbwrap_open.c b/source3/lib/dbwrap/dbwrap_open.c index eac52c5a431..e67341607a4 100644 --- a/source3/lib/dbwrap/dbwrap_open.c +++ b/source3/lib/dbwrap/dbwrap_open.c @@ -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; } |