[gnome-settings-daemon] updates: Also look for pkexec in the system directories



commit 8894557db934316dee4198e6285ffbe321ce7499
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Jan 17 11:54:04 2013 +0100

    updates: Also look for pkexec in the system directories

 plugins/updates/gsd-updates-firmware.c |    4 ++--
 plugins/updates/gsd-updates-manager.c  |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/plugins/updates/gsd-updates-firmware.c b/plugins/updates/gsd-updates-firmware.c
index 709140a..49e948d 100644
--- a/plugins/updates/gsd-updates-firmware.c
+++ b/plugins/updates/gsd-updates-firmware.c
@@ -184,14 +184,14 @@ device_rebind (GsdUpdatesFirmware *firmware)
                 g_string_set_size (string, string->len-1);
 
         /* use PolicyKit to do this as root */
-        argv[0] = BINDIR "/pkexec";
+        argv[0] = "pkexec";
         argv[1] = GSD_UPDATES_FIRMWARE_DEVICE_REBIND_PROGRAM;
         argv[2] = string->str;
         argv[3] = NULL;
         ret = g_spawn_sync (NULL,
                             argv,
                             NULL,
-                            0,
+                            G_SPAWN_SEARCH_PATH,
                             NULL, NULL,
                             &rebind_stdout,
                             &rebind_stderr,
diff --git a/plugins/updates/gsd-updates-manager.c b/plugins/updates/gsd-updates-manager.c
index df2b6ba..ad8ea61 100644
--- a/plugins/updates/gsd-updates-manager.c
+++ b/plugins/updates/gsd-updates-manager.c
@@ -88,13 +88,13 @@ clear_offline_updates_message (void)
         gchar *argv[3];
         GPid pid;
 
-        argv[0] = BINDIR "/pkexec";
+        argv[0] = "pkexec";
         argv[1] = LIBEXECDIR "/pk-clear-offline-update";
         argv[2] = NULL;
         ret = g_spawn_async (NULL,
                              argv,
                              NULL,
-                             G_SPAWN_DO_NOT_REAP_CHILD,
+                             G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH,
                              NULL,
                              NULL,
                              &pid,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]