evas-wayland-shm: Fix Insecure temporary file

Fix using mkstemp directly without securely setting umask first by
making use of eina_file_mkstemp function which does set umask.

Fixes Coverity CID1357164

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2016-07-08 08:46:12 -04:00
parent 19b2915863
commit b2a8ef3d13
1 changed files with 3 additions and 1 deletions

View File

@ -108,8 +108,10 @@ _shm_pool_make(struct wl_shm *shm, int size, void **data)
strcat(name, tmp);
fd = eina_file_mkstemp(name, NULL);
if (fd < 0)
/* try to create tmp file */
if ((fd = mkstemp(name)) < 0)
/* if ((fd = mkstemp(name)) < 0) */
{
ERR("Could not create temporary file: %m");
free(name);