chiark / gitweb /
Fix possible lack of status messages on shutdown/reboot
[elogind.git] / src / core / dbus-device.c
index dfbbafb66da93efd438544345e30c65e3b426f60..ef484a86b7be16ed065b83ee440647ec01e087ff 100644 (file)
@@ -22,6 +22,7 @@
 #include "dbus-unit.h"
 #include "dbus-device.h"
 #include "dbus-common.h"
+#include "selinux-access.h"
 
 #define BUS_DEVICE_INTERFACE                                            \
         " <interface name=\"org.freedesktop.systemd1.Device\">\n"       \
@@ -42,7 +43,7 @@
         BUS_UNIT_INTERFACES_LIST                     \
         "org.freedesktop.systemd1.Device\0"
 
-const char bus_device_interface[] _introspect_("Device") = BUS_DEVICE_INTERFACE;
+const char bus_device_interface[] = BUS_DEVICE_INTERFACE;
 
 const char bus_device_invalidating_properties[] =
         "SysFSPath\0";
@@ -61,5 +62,7 @@ DBusHandlerResult bus_device_message_handler(Unit *u, DBusConnection *c, DBusMes
                 { NULL, }
         };
 
+        SELINUX_UNIT_ACCESS_CHECK(u, c, message, "status");
+
         return bus_default_message_handler(c, message, INTROSPECTION, INTERFACES_LIST, bps);
 }