From db9cad3932524c020b0f16f6c4c15236cf974b50 Mon Sep 17 00:00:00 2001 From: ChunEon Park Date: Wed, 9 Jan 2013 09:17:33 +0000 Subject: [PATCH] elementary/mode/access - set file create mode before create temp file. SVN revision: 82446 --- legacy/elementary/src/modules/access_output/mod.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/legacy/elementary/src/modules/access_output/mod.c b/legacy/elementary/src/modules/access_output/mod.c index 3956a40..91e5bb2 100644 --- a/legacy/elementary/src/modules/access_output/mod.c +++ b/legacy/elementary/src/modules/access_output/mod.c @@ -63,9 +63,12 @@ out_read(const char *txt) if (!tmpf) { char buf[PATH_MAX]; + mode_t cur_umask; snprintf(buf, sizeof(buf), "/tmp/.elm-speak-XXXXXX"); + cur_umask = umask(S_IRWXO | S_IRWXG); tmpfd = mkstemp(buf); + umask(cur_umask); if (tmpfd >= 0) tmpf = strdup(buf); else return; } -- 2.7.4