mdbx: create new files with mode=0640 inside mdbx_env_copy().

Change-Id: I468f0fa29d471a2e877ea20a5e61f6358347c6eb
This commit is contained in:
Leo Yuriev 2018-06-30 14:26:34 +03:00
parent e57d4bbb00
commit c9d0c8edeb

View File

@ -10550,7 +10550,7 @@ int __cold mdbx_env_copy(MDBX_env *env, const char *dest_path, unsigned flags) {
/* The destination path must exist, but the destination file must not.
* We don't want the OS to cache the writes, since the source data is
* already in the OS cache. */
int rc = mdbx_openfile(dxb_pathname, O_WRONLY | O_CREAT | O_EXCL, 0666,
int rc = mdbx_openfile(dxb_pathname, O_WRONLY | O_CREAT | O_EXCL, 0640,
&newfd, true);
if (rc == MDBX_SUCCESS) {
if (env->me_psize >= env->me_os_psize) {