forked from enlightenment/efl
elput: Fix insecure temporary file
Fix using mkstemp directly without securely setting umask first by making use of eina_file_mkstemp which does set unmask. Fixes Coverity CID1357165 @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
b2a8ef3d13
commit
ee72059219
|
@ -79,7 +79,8 @@ _keyboard_fd_get(off_t size)
|
|||
else
|
||||
return -1;
|
||||
|
||||
if ((fd = mkstemp(tmp)) < 0) return -1;
|
||||
fd = eina_file_mkstemp(tmp, NULL);
|
||||
if (fd < 0) return -1;
|
||||
|
||||
flags = fcntl(fd, F_GETFD);
|
||||
if (flags < 0)
|
||||
|
|
Loading…
Reference in New Issue