summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-12-12 15:58:31 +0100
committerLennart Poettering <lennart@poettering.net>2013-12-12 15:59:13 +0100
commitad5b215d1bb06c908832de9297360b4266aef471 (patch)
tree930f3e3b4408edd0cee5c8cbb5fcb93122dc13c7 /src/core
parent01390ca8a23292b6b78ec782a43b29a0d10e4af4 (diff)
core: suppress gcc warnings on selinux-less systems
Diffstat (limited to 'src/core')
-rw-r--r--src/core/dbus.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/dbus.c b/src/core/dbus.c
index df501384bd..ccbbc3474d 100644
--- a/src/core/dbus.c
+++ b/src/core/dbus.c
@@ -211,6 +211,7 @@ failed:
return 0;
}
+#ifdef HAVE_SELINUX
static int selinux_filter(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
Manager *m = userdata;
const char *verb, *path;
@@ -276,6 +277,7 @@ static int selinux_filter(sd_bus *bus, sd_bus_message *message, void *userdata,
return 0;
}
+#endif
static int bus_job_find(sd_bus *bus, const char *path, const char *interface, void *userdata, void **found, sd_bus_error *error) {
Manager *m = userdata;
@@ -534,11 +536,13 @@ static int bus_setup_api_vtables(Manager *m, sd_bus *bus) {
assert(m);
assert(bus);
+#ifdef HAVE_SELINUX
r = sd_bus_add_filter(bus, selinux_filter, m);
if (r < 0) {
log_error("Failed to add SELinux access filter: %s", strerror(-r));
return r;
}
+#endif
r = sd_bus_add_object_vtable(bus, "/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager", bus_manager_vtable, m);
if (r < 0) {