summaryrefslogtreecommitdiff
path: root/src/modules/access_output
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2013-01-09 09:17:33 +0000
committerChunEon Park <hermet@hermet.pe.kr>2013-01-09 09:17:33 +0000
commit06f0c2742ba55ba2229fe9fb9890eb33eeb828e4 (patch)
treec1e8366eb4a515074f803fd9fa2ea1ebc4589d72 /src/modules/access_output
parent118e9b7e63b438aa35e9616913fe75d18ad4cae8 (diff)
elementary/mode/access - set file create mode before create temp file.
SVN revision: 82446
Diffstat (limited to 'src/modules/access_output')
-rw-r--r--src/modules/access_output/mod.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/modules/access_output/mod.c b/src/modules/access_output/mod.c
index 3956a402b..91e5bb2d2 100644
--- a/src/modules/access_output/mod.c
+++ b/src/modules/access_output/mod.c
@@ -63,9 +63,12 @@ out_read(const char *txt)
63 if (!tmpf) 63 if (!tmpf)
64 { 64 {
65 char buf[PATH_MAX]; 65 char buf[PATH_MAX];
66 mode_t cur_umask;
66 67
67 snprintf(buf, sizeof(buf), "/tmp/.elm-speak-XXXXXX"); 68 snprintf(buf, sizeof(buf), "/tmp/.elm-speak-XXXXXX");
69 cur_umask = umask(S_IRWXO | S_IRWXG);
68 tmpfd = mkstemp(buf); 70 tmpfd = mkstemp(buf);
71 umask(cur_umask);
69 if (tmpfd >= 0) tmpf = strdup(buf); 72 if (tmpfd >= 0) tmpf = strdup(buf);
70 else return; 73 else return;
71 } 74 }