From 70a735b75ac8ca942b212cc1c56441e9387f30e6 Mon Sep 17 00:00:00 2001 From: Sanju Rakonde Date: Mon, 8 Jul 2019 11:34:49 +0530 Subject: core: use more restrictive mode while creating the directories fixes: bz#1724024 Change-Id: I539fb7248b2cfc037ec29f1413ea648f9ec21ef2 Signed-off-by: Sanju Rakonde --- libglusterfs/src/compat.c | 2 +- libglusterfs/src/store.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'libglusterfs') diff --git a/libglusterfs/src/compat.c b/libglusterfs/src/compat.c index 877cda282de..8a05a30a8fe 100644 --- a/libglusterfs/src/compat.c +++ b/libglusterfs/src/compat.c @@ -176,7 +176,7 @@ solaris_xattr_resolve_path(const char *real_path, char **path) if (!ret && export_path) { strcat(export_path, "/" GF_SOLARIS_XATTR_DIR); if (lstat(export_path, &statbuf)) { - ret = mkdir(export_path, 0777); + ret = mkdir(export_path, 0755); if (ret && (errno != EEXIST)) { gf_msg_debug(THIS->name, 0, "mkdir failed," diff --git a/libglusterfs/src/store.c b/libglusterfs/src/store.c index 06ef75e3d35..d33c572dc30 100644 --- a/libglusterfs/src/store.c +++ b/libglusterfs/src/store.c @@ -22,7 +22,7 @@ gf_store_mkdir(char *path) { int32_t ret = -1; - ret = mkdir_p(path, 0777, _gf_true); + ret = mkdir_p(path, 0755, _gf_true); if ((-1 == ret) && (EEXIST != errno)) { gf_msg("", GF_LOG_ERROR, errno, LG_MSG_DIR_OP_FAILED, -- cgit