X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fdbus-socket.c;h=2092a636948e250d1dbd06570ce076f22b03cbc4;hb=8b55b8c4e7fce5e05dcfd783a37fb843d1bf1868;hp=b2045225d71d154aee58fdbfa128bb9613dfc8e4;hpb=4819ff0358b6317c195fd4b1768e03d09c871070;p=elogind.git diff --git a/src/core/dbus-socket.c b/src/core/dbus-socket.c index b2045225d..2092a6369 100644 --- a/src/core/dbus-socket.c +++ b/src/core/dbus-socket.c @@ -26,6 +26,7 @@ #include "dbus-execute.h" #include "dbus-kill.h" #include "dbus-common.h" +#include "selinux-access.h" #define BUS_SOCKET_INTERFACE \ " \n" \ @@ -38,6 +39,7 @@ BUS_EXEC_COMMAND_INTERFACE("ExecStopPost") \ BUS_EXEC_CONTEXT_INTERFACE \ BUS_KILL_CONTEXT_INTERFACE \ + BUS_UNIT_CGROUP_INTERFACE \ " \n" \ " \n" \ " \n" \ @@ -62,6 +64,9 @@ " \n" \ " \n" \ " \n" \ + " \n" \ + " \n" \ + " \n" \ " \n" \ #define INTROSPECTION \ @@ -125,6 +130,9 @@ static const BusProperty bus_socket_properties[] = { { "MessageQueueMaxMessages", bus_property_append_long, "x", offsetof(Socket, mq_maxmsg) }, { "MessageQueueMessageSize", bus_property_append_long, "x", offsetof(Socket, mq_msgsize) }, { "Result", bus_socket_append_socket_result, "s", offsetof(Socket, result) }, + { "SmackLabel", bus_property_append_string, "s", offsetof(Socket, smack), true }, + { "SmackLabelIPIn", bus_property_append_string, "s", offsetof(Socket, smack_ip_in), true }, + { "SmackLabelIPOut",bus_property_append_string, "s", offsetof(Socket, smack_ip_out), true }, { NULL, } }; @@ -135,8 +143,11 @@ DBusHandlerResult bus_socket_message_handler(Unit *u, DBusConnection *c, DBusMes { "org.freedesktop.systemd1.Socket", bus_socket_properties, s }, { "org.freedesktop.systemd1.Socket", bus_exec_context_properties, &s->exec_context }, { "org.freedesktop.systemd1.Socket", bus_kill_context_properties, &s->kill_context }, + { "org.freedesktop.systemd1.Socket", bus_unit_properties, u }, { NULL, } }; + SELINUX_UNIT_ACCESS_CHECK(u, c, message, "status"); + return bus_default_message_handler(c, message, INTROSPECTION, INTERFACES_LIST, bps); }