jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=03cc40322880bac36a23dab3070bc51041a1ffdc

commit 03cc40322880bac36a23dab3070bc51041a1ffdc
Author: Jean-Philippe Andre <[email protected]>
Date:   Thu Oct 30 18:23:49 2014 +0900

    Eina file: Fix calls to getenv
    
    There seems to be an intent to check that UID==EUID
    before calling getenv to get the temp directory.
    But that was lost in commits 61478af3a6c4f9263 and
    then in e105abc99e717b84723ab35258375e27f17f8e82.
---
 src/lib/eina/eina_file_common.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/lib/eina/eina_file_common.c b/src/lib/eina/eina_file_common.c
index 5c2b87a..3e5b615 100644
--- a/src/lib/eina/eina_file_common.c
+++ b/src/lib/eina/eina_file_common.c
@@ -908,8 +908,10 @@ eina_file_mkstemp(const char *templatename, Eina_Tmpstr 
**path)
 #if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
    if (getuid() == geteuid())
 #endif
-     tmpdir = getenv("TMPDIR");
-   if (!tmpdir) tmpdir = getenv("XDG_RUNTIME_DIR");
+     {
+        tmpdir = getenv("TMPDIR");
+        if (!tmpdir) tmpdir = getenv("XDG_RUNTIME_DIR");
+     }
    if (!tmpdir) tmpdir = "/tmp";
 #else
    tmpdir = (char *)evil_tmpdir_get();

-- 


Reply via email to