mdbx: accept MDBX_EACCESS and MDBX_EPERM for without-LCK read-only mode.

Change-Id: I024243184c06ddf86bcc62d6e4b1b951d21789d5
This commit is contained in:
Leonid Yuriev 2019-09-11 19:54:08 +03:00
parent 6fc3b89f79
commit 4ea1d2f8d2

View File

@ -6666,7 +6666,8 @@ static int __cold mdbx_setup_lck(MDBX_env *env, char *lck_pathname,
(env->me_flags & MDBX_EXCLUSIVE) ? true : false);
if (err != MDBX_SUCCESS) {
if (!(err == MDBX_ENOFILE && (env->me_flags & MDBX_EXCLUSIVE)) &&
!(err == MDBX_EROFS && (env->me_flags & MDBX_RDONLY)))
!((err == MDBX_EROFS || err == MDBX_EACCESS || err == MDBX_EPERM) &&
(env->me_flags & MDBX_RDONLY)))
return err;
/* LY: without-lck mode (e.g. exclusive or on read-only filesystem) */