From 0670162551150bd34110874600d1c2e1d119d6f2 Mon Sep 17 00:00:00 2001 From: kremlin Date: Fri, 15 Aug 2014 21:11:32 -0500 Subject: add polkit auth object, compile it in makefile, add header to interfaces src/polkit-auth.c and its header are seperately built objects, linked to interfaces, which expose a single, safe auth checking function --- src/interfaces/hostnamed/hostnamed.c | 4 ++++ src/interfaces/localed/localed.c | 2 ++ src/interfaces/logind/logind.c | 2 ++ src/interfaces/timedated/timedated.c | 2 ++ 4 files changed, 10 insertions(+) (limited to 'src/interfaces') diff --git a/src/interfaces/hostnamed/hostnamed.c b/src/interfaces/hostnamed/hostnamed.c index b10b4b7..574357d 100644 --- a/src/interfaces/hostnamed/hostnamed.c +++ b/src/interfaces/hostnamed/hostnamed.c @@ -34,6 +34,8 @@ #include "hostnamed-gen.h" #include "hostnamed.h" +#include "../../polkit-auth.h" + /* format: { * (1) string to be matched against runtime machine's sysctl output. * can be either the exact string or a substring contained @@ -403,6 +405,8 @@ int main() { CHASSIS = ICON = OS_CPENAME = 0; KERN_NAME = KERN_RELEASE = KERN_VERS = 0; HOSTNAME = STATIC_HOSTNAME = PRETTY_HOSTNAME = NULL; + + test_func(); set_signal_handlers(); diff --git a/src/interfaces/localed/localed.c b/src/interfaces/localed/localed.c index 596c2e3..33769a3 100644 --- a/src/interfaces/localed/localed.c +++ b/src/interfaces/localed/localed.c @@ -28,6 +28,8 @@ #include "localed-gen.h" #include "localed.h" +#include "../../polkit-auth.h" + GPtrArray *localed_freeable; Locale1 *localed_interf; diff --git a/src/interfaces/logind/logind.c b/src/interfaces/logind/logind.c index 9ccde2f..c445665 100644 --- a/src/interfaces/logind/logind.c +++ b/src/interfaces/logind/logind.c @@ -28,6 +28,8 @@ #include "logind-gen.h" #include "logind.h" +#include "../../polkit-auth.h" + GPtrArray *logind_freeable; Login1Manager *logind_interf; diff --git a/src/interfaces/timedated/timedated.c b/src/interfaces/timedated/timedated.c index 67f7a0c..f76850c 100644 --- a/src/interfaces/timedated/timedated.c +++ b/src/interfaces/timedated/timedated.c @@ -28,6 +28,8 @@ #include "timedated-gen.h" #include "timedated.h" +#include "../../polkit-auth.h" + GPtrArray *timedated_freeable; Timedate1 *timedated_interf; -- cgit v1.2.3