summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-mountbroker.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-mountbroker.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-mountbroker.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-mountbroker.c b/xlators/mgmt/glusterd/src/glusterd-mountbroker.c
index 3125612d2cf..7c069ced984 100644
--- a/xlators/mgmt/glusterd/src/glusterd-mountbroker.c
+++ b/xlators/mgmt/glusterd/src/glusterd-mountbroker.c
@@ -525,6 +525,7 @@ glusterd_do_mount (char *label, dict_t *argdict, char **path, int *op_errno)
runner_t runner = {0,};
int ret = 0;
xlator_t *this = THIS;
+ mode_t orig_umask = 0;
priv = this->private;
GF_ASSERT (priv);
@@ -624,7 +625,9 @@ glusterd_do_mount (char *label, dict_t *argdict, char **path, int *op_errno)
*op_errno = ENOMEM;
goto out;
}
+ orig_umask = umask(S_IRWXG | S_IRWXO);
ret = mkstemp (cookie);
+ umask(orig_umask);
if (ret == -1) {
*op_errno = errno;
goto out;