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 --- xlators/mgmt/glusterd/src/glusterd-store.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-store.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c index 1ad3c743d3b..ee1c01d39ba 100644 --- a/xlators/mgmt/glusterd/src/glusterd-store.c +++ b/xlators/mgmt/glusterd/src/glusterd-store.c @@ -1760,7 +1760,7 @@ glusterd_store_delete_volume(glusterd_volinfo_t *volinfo) goto out; } - ret = sys_mkdir(trashdir, 0777); + ret = sys_mkdir(trashdir, 0755); if (ret && errno != EEXIST) { gf_msg(this->name, GF_LOG_ERROR, errno, GD_MSG_CREATE_DIR_FAILED, "Failed to create trash " @@ -1847,7 +1847,7 @@ glusterd_store_delete_snap(glusterd_snap_t *snap) goto out; } - ret = sys_mkdir(trashdir, 0777); + ret = sys_mkdir(trashdir, 0755); if (ret && errno != EEXIST) { gf_msg(this->name, GF_LOG_ERROR, errno, GD_MSG_CREATE_DIR_FAILED, "Failed to create trash " @@ -3849,7 +3849,7 @@ glusterd_recreate_vol_brick_mounts(xlator_t *this, glusterd_volinfo_t *volinfo) ret = sys_lstat(brickinfo->path, &st_buf); if (ret) { if (errno == ENOENT) { - ret = mkdir_p(brick_mount_path, 0777, _gf_true); + ret = mkdir_p(brick_mount_path, 0755, _gf_true); if (ret) { gf_msg(this->name, GF_LOG_ERROR, errno, GD_MSG_CREATE_DIR_FAILED, "Failed to create %s. ", -- cgit