diff options
author | Nandaja Varma <nvarma@redhat.com> | 2015-02-03 16:35:33 +0530 |
---|---|---|
committer | Niels de Vos <ndevos@redhat.com> | 2015-06-12 00:48:11 -0700 |
commit | 886f65fabc50c256a7de57fd05281a75bba3cac9 (patch) | |
tree | 9e10b3463433d17abba70b88e8b295f9e3afd9c0 /libglusterfs/src/statedump.c | |
parent | 04791e4d53650eb108890e9ad9a809768a06987b (diff) |
libglusterfs: Fixing insecure temp file coverity issue
Coverity CID: 1124835
Change-Id: I7e87f2b3bad35cf8a9c64c8502de23662d9f677f
BUG: 789278
Signed-off-by: Nandaja Varma <nvarma@redhat.com>
Reviewed-on: http://review.gluster.org/9565
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Sakshi Bansal
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Prashanth Pai <ppai@redhat.com>
Diffstat (limited to 'libglusterfs/src/statedump.c')
-rw-r--r-- | libglusterfs/src/statedump.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libglusterfs/src/statedump.c b/libglusterfs/src/statedump.c index 3eebd2106f9..fc66421be2f 100644 --- a/libglusterfs/src/statedump.c +++ b/libglusterfs/src/statedump.c @@ -60,7 +60,9 @@ gf_proc_dump_open (char *tmpname) { int dump_fd = -1; + mode_t mask = umask(S_IRWXG | S_IRWXO); dump_fd = mkstemp (tmpname); + umask(mask); if (dump_fd < 0) return -1; |