From: Hallvard Furuseth Date: Mon, 15 Oct 2012 15:04:11 +0000 (+0200) Subject: mdb_env_open(): Keep mdb_env_set_flags() flags. X-Git-Tag: OPENLDAP_REL_ENG_2_4_34~139^2~14 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e9d87866c49acdba4118259fb05de2dafb4d698f;p=openldap mdb_env_open(): Keep mdb_env_set_flags() flags. --- diff --git a/libraries/libmdb/mdb.c b/libraries/libmdb/mdb.c index 07ecf99eba..cd2ad9a510 100644 --- a/libraries/libmdb/mdb.c +++ b/libraries/libmdb/mdb.c @@ -3155,6 +3155,7 @@ mdb_env_open(MDB_env *env, const char *path, unsigned int flags, mode_t mode) sprintf(dpath, "%s" DATANAME, path); } + flags |= env->me_flags; /* silently ignore WRITEMAP if we're only getting read access */ if (F_ISSET(flags, MDB_RDONLY|MDB_WRITEMAP)) flags ^= MDB_WRITEMAP; diff --git a/libraries/libmdb/mdb.h b/libraries/libmdb/mdb.h index 1735fbd375..d78868cb08 100644 --- a/libraries/libmdb/mdb.h +++ b/libraries/libmdb/mdb.h @@ -401,6 +401,7 @@ int mdb_env_create(MDB_env **env); * @param[in] flags Special options for this environment. This parameter * must be set to 0 or by bitwise OR'ing together one or more of the * values described here. + * Flags set by mdb_env_set_flags() are also used. *