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:
Chris Michael 2016-07-08 08:48:27 -04:00
parent b2a8ef3d13
commit ee72059219
1 changed files with 2 additions and 1 deletions

View File

@ -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)