aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/hostnamed/hostnamed.c4
-rw-r--r--src/interfaces/localed/localed.c2
-rw-r--r--src/interfaces/logind/logind.c2
-rw-r--r--src/interfaces/timedated/timedated.c2
-rw-r--r--src/polkit-auth.c29
-rw-r--r--src/polkit-auth.h18
6 files changed, 57 insertions, 0 deletions
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;
diff --git a/src/polkit-auth.c b/src/polkit-auth.c
new file mode 100644
index 0000000..2e4178f
--- /dev/null
+++ b/src/polkit-auth.c
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2014 Ian Sutton <ian@kremlin.cc>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <unistd.h>
+#include <limits.h>
+#include <string.h>
+
+#include <glib/gprintf.h>
+#include <glib-unix.h>
+#include <polkit/polkit.h>
+
+#include "polkit-auth.h"
+
+void test_func() {
+ g_printf("test!\n");
+}
diff --git a/src/polkit-auth.h b/src/polkit-auth.h
new file mode 100644
index 0000000..17a919b
--- /dev/null
+++ b/src/polkit-auth.h
@@ -0,0 +1,18 @@
+/*
+ * Copyright (c) 2014 Ian Sutton <ian@kremlin.cc>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+
+void test_func();