include polkit.h in all interfaces, edit makefile accordingly
authorkremlin <ian@kremlin.cc>
Fri, 15 Aug 2014 18:11:08 +0000 (13:11 -0500)
committerkremlin <ian@kremlin.cc>
Fri, 15 Aug 2014 18:11:08 +0000 (13:11 -0500)
Makefile
src/interfaces/hostnamed/hostnamed.c
src/interfaces/localed/localed.c
src/interfaces/logind/logind.c
src/interfaces/timedated/timedated.c

index 8ad85c63ca67ab0cc9c59c06cdd4cb3e0d6c8efd..236fd3cdb110ec33a62e41cfdec78aa2a9679d07 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,8 +7,8 @@ DEBUGF=-O0 -g
 LINKGN=bin/obj/hostnamed-gen.o bin/obj/localed-gen.o bin/obj/timedated-gen.o bin/obj/logind-gen.o
 LINKHN=bin/systemd-hostnamed bin/systemd-localed bin/systemd-timedated bin/systemd-logind
 
-GLIBEF=`pkg-config --cflags --libs glib-2.0 gobject-2.0 gio-2.0 gio-unix-2.0`
-GLIBOF=`pkg-config --cflags        glib-2.0 gobject-2.0 gio-2.0 gio-unix-2.0`
+GLIBEF=`pkg-config --cflags --libs glib-2.0 gobject-2.0 gio-2.0 gio-unix-2.0 polkit-agent-1`
+GLIBOF=`pkg-config --cflags        glib-2.0 gobject-2.0 gio-2.0 gio-unix-2.0 polkit-agent-1`
 
 SANITY=-Wno-unused-variable -Wno-unused-parameter # -Wno-comment
 
index d8111d8367a59155e65399f43d7f07a908e5f1cc..19a196cc62929b2cdd346176a9b94ed7c267580f 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <glib/gprintf.h>
 #include <glib-unix.h>
-/* #include <gtk/gtk.h> */
+#include <polkit/polkit.h>
 
 #include "hostnamed-gen.h"
 #include "hostnamed.h"
@@ -137,7 +137,8 @@ on_handle_set_hostname(Hostname1 *hn1_passed_interf,
             ret = TRUE;
     }
 
-    hostname1_complete_set_hostname(hn1_passed_interf, invoc);
+    if(ret)
+        hostname1_complete_set_hostname(hn1_passed_interf, invoc);
 
     if(proposed_hostname)
         g_free(proposed_hostname);
index f788441b06179135d3695f67a766b9bb409a44b2..596c2e3404e8b65cc7292f42290f996b1928e357 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <glib/gprintf.h>
 #include <glib-unix.h>
+#include <polkit/polkit.h>
 
 #include "localed-gen.h"
 #include "localed.h"
index 7d887b6b9d6adb9f6e556566516c3ba176c34999..9ccde2f42ceed1da92326ad22b96e6cba4946a5a 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <glib/gprintf.h>
 #include <glib-unix.h>
+#include <polkit/polkit.h>
 
 #include "logind-gen.h"
 #include "logind.h"
index 4dd2dba0fba24ca1948dc444ed2e845f31d6e477..67f7a0c4a9bcac07a81f92d447c53a87c7306d43 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <glib/gprintf.h>
 #include <glib-unix.h>
+#include <polkit/polkit.h>
 
 #include "timedated-gen.h"
 #include "timedated.h"