summaryrefslogtreecommitdiff
path: root/src/modules/ecore_evas/engines
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-01-08 19:46:23 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-01-08 19:46:23 +0900
commitb95ef3801f9719a8f8ff731e25d66a8d1dd417cd (patch)
tree258548da51b18d5fde17915bdc36cba44effcf40 /src/modules/ecore_evas/engines
parent323f293ab538ffc7431f6598736963a834c4f880 (diff)
setuid safeness - ensure if an app that is setuid doesn't do bad things
this makes efl ignore certain env vars for thnigs and entirely removes user modules (that no one ever used) etc. etc. to ensure that *IF* an app is setuid, there isn't a priv escalation path that is easy.
Diffstat (limited to 'src/modules/ecore_evas/engines')
-rw-r--r--src/modules/ecore_evas/engines/extn/ecore_evas_extn_buf.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/modules/ecore_evas/engines/extn/ecore_evas_extn_buf.c b/src/modules/ecore_evas/engines/extn/ecore_evas_extn_buf.c
index 32b2e7bfbd..37261fa41f 100644
--- a/src/modules/ecore_evas/engines/extn/ecore_evas_extn_buf.c
+++ b/src/modules/ecore_evas/engines/extn/ecore_evas_extn_buf.c
@@ -40,10 +40,13 @@ _extnbuf_new(const char *base, int id, Eina_Bool sys, int num,
40 40
41 if (b->am_owner) 41 if (b->am_owner)
42 { 42 {
43 const char *s; 43 const char *s = NULL;
44 44
45 s = getenv("XDG_RUNTIME_DIR"); 45 if (getuid() == getuid())
46 if (!s) s = getenv("TMPDIR"); 46 {
47 s = getenv("XDG_RUNTIME_DIR");
48 if (!s) s = getenv("TMPDIR");
49 }
47 if (!s) s = "/tmp"; 50 if (!s) s = "/tmp";
48 snprintf(file, sizeof(file), "%s/ee-lock-XXXXXX", s); 51 snprintf(file, sizeof(file), "%s/ee-lock-XXXXXX", s);
49 b->lockfd = mkstemp(file); 52 b->lockfd = mkstemp(file);