summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-06-24 12:00:30 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-06-24 12:00:30 +0900
commit8e3d94d66130f16cec0d518a0ad6ec5fae04fec9 (patch)
treec18361e0309cc51744a845bf761a4d3e0bb8d907
parent1633d7f3bb7ebe69e704e3a76c6b32552a59285a (diff)
efreet: don't try change permissions on runtime dir we don't own.
-rw-r--r--src/lib/efreet/efreet_base.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/lib/efreet/efreet_base.c b/src/lib/efreet/efreet_base.c
index 26346e0a65..93e264cf70 100644
--- a/src/lib/efreet/efreet_base.c
+++ b/src/lib/efreet/efreet_base.c
@@ -335,13 +335,16 @@ efreet_dirs_init(void)
335 } 335 }
336 else if ((st.st_mode & 0777) != 0700) 336 else if ((st.st_mode & 0777) != 0700)
337 { 337 {
338 ERR("XDG_RUNTIME_DIR=%s is mode %o, changing to 0700", 338 if (st.st_uid == geteuid())
339 xdg_runtime_dir, st.st_mode & 0777);
340 if (chmod(xdg_runtime_dir, 0700) != 0)
341 { 339 {
342 CRITICAL("Cannot fix XDG_RUNTIME_DIR=%s incorrect mode %o: %s", 340 ERR("XDG_RUNTIME_DIR=%s is mode %o, changing to 0700",
343 xdg_runtime_dir, st.st_mode & 0777, strerror(errno)); 341 xdg_runtime_dir, st.st_mode & 0777);
344 eina_stringshare_replace(&xdg_runtime_dir, NULL); 342 if (chmod(xdg_runtime_dir, 0700) != 0)
343 {
344 CRITICAL("Cannot fix XDG_RUNTIME_DIR=%s incorrect mode %o: %s",
345 xdg_runtime_dir, st.st_mode & 0777, strerror(errno));
346 eina_stringshare_replace(&xdg_runtime_dir, NULL);
347 }
345 } 348 }
346 } 349 }
347 /* hostname */ 350 /* hostname */