Ensure PATH is set
authorDavid Zeuthen <davidz@redhat.com>
Sat, 21 Jan 2012 21:26:46 +0000 (16:26 -0500)
committerDavid Zeuthen <davidz@redhat.com>
Sat, 21 Jan 2012 21:26:46 +0000 (16:26 -0500)
Apparently PATH may be empty if activated by recent D-Bus daemons.

Signed-off-by: David Zeuthen <davidz@redhat.com>
src/main.c

index a330a58..0039fe8 100644 (file)
@@ -140,6 +140,9 @@ main (int    argc,
         }
     }
 
+  if (g_getenv ("PATH") == NULL)
+    g_setenv ("PATH", "/usr/bin:/bin:/usr/sbin:/sbin", TRUE);
+
   udisks_notice ("udisks daemon version %s starting", PACKAGE_VERSION);
 
   loop = g_main_loop_new (NULL, FALSE);