englebass pushed a commit to branch master.
commit a8d70f803cc4c9c1da3eb9e0bfbdea41229d4398
Author: Sebastian Dransfeld <[email protected]>
Date: Wed Aug 7 10:52:48 2013 +0200
efreet: Check return value of chmod
CID: #1039690
---
src/lib/efreet/efreet_base.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/lib/efreet/efreet_base.c b/src/lib/efreet/efreet_base.c
index 7a13982..7c68751 100644
--- a/src/lib/efreet/efreet_base.c
+++ b/src/lib/efreet/efreet_base.c
@@ -321,7 +321,14 @@ efreet_dirs_init(void)
ERR("$XDG_RUNTIME_DIR did not exist, creating '%s' (breaks spec)",
xdg_runtime_dir);
if (ecore_file_mkpath(xdg_runtime_dir))
- chmod(xdg_runtime_dir, 0700);
+ {
+ if (chmod(xdg_runtime_dir, 0700) < 0)
+ {
+ CRITICAL("Cannot set XDG_RUNTIME_DIR=%s to mode 0700: %s",
+ xdg_runtime_dir, strerror(errno));
+ eina_stringshare_replace(&xdg_runtime_dir, NULL);
+ }
+ }
else
{
CRITICAL("Failed to create XDG_RUNTIME_DIR=%s", xdg_runtime_dir);
--
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk