forked from enlightenment/efl
elementary/mode/access - set file create mode before create temp file.
SVN revision: 82446
This commit is contained in:
parent
081f9f8006
commit
db9cad3932
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue