projects
/
platform
/
upstream
/
enlightenment.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f2ce10
)
e: Create a temp XDG_RUNTIME_DIR if not set
author
Sebastian Dransfeld
<sd@tango.flipp.net>
Thu, 20 Jun 2013 11:29:37 +0000
(13:29 +0200)
committer
Sebastian Dransfeld
<sd@tango.flipp.net>
Thu, 20 Jun 2013 11:29:37 +0000
(13:29 +0200)
Using /tmp as XDG_RUNTIME_DIR is pointless if we want it to be mode 0700
src/bin/e_main.c
patch
|
blob
|
history
diff --git
a/src/bin/e_main.c
b/src/bin/e_main.c
index
5a10ffa
..
fd81bc6
100644
(file)
--- a/
src/bin/e_main.c
+++ b/
src/bin/e_main.c
@@
-151,7
+151,15
@@
_xdg_data_dirs_augment(void)
}
if (!getenv("XDG_RUNTIME_DIR"))
- e_util_env_set("XDG_RUNTIME_DIR", "/tmp");
+ {
+ char buf[PATH_MAX];
+ const char *dir;
+
+ snprintf(buf, sizeof(buf), "/tmp/xdg_runtime_XXXXXX");
+ dir = mkdtemp(buf);
+ if (!dir) dir = "/tmp";
+ e_util_env_set("XDG_RUNTIME_DIR", dir);
+ }
}
static void