X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fcore%2Fdbus-socket.c;h=887c80eb893605a54a47f1960a8771174da1cbe5;hp=80d19dd1bd917b08fd66b4fae21a1fac98acceae;hb=aea54018a5e66a41318afb6c6be745b6aef48d9e;hpb=5430f7f2bc7330f3088b894166bf3524a067e3d8 diff --git a/src/core/dbus-socket.c b/src/core/dbus-socket.c index 80d19dd1b..887c80eb8 100644 --- a/src/core/dbus-socket.c +++ b/src/core/dbus-socket.c @@ -24,7 +24,9 @@ #include "dbus-unit.h" #include "dbus-socket.h" #include "dbus-execute.h" +#include "dbus-kill.h" #include "dbus-common.h" +#include "selinux-access.h" #define BUS_SOCKET_INTERFACE \ " \n" \ @@ -36,10 +38,13 @@ BUS_EXEC_COMMAND_INTERFACE("ExecStopPre") \ BUS_EXEC_COMMAND_INTERFACE("ExecStopPost") \ BUS_EXEC_CONTEXT_INTERFACE \ + BUS_KILL_CONTEXT_INTERFACE \ " \n" \ " \n" \ " \n" \ " \n" \ + " \n" \ + " \n" \ " \n" \ " \n" \ " \n" \ @@ -60,6 +65,9 @@ " \n" \ " \n" \ " \n" \ + " \n" \ + " \n" \ + " \n" \ " \n" \ #define INTROSPECTION \ @@ -103,6 +111,8 @@ static const BusProperty bus_socket_properties[] = { { "BindToDevice", bus_property_append_string, "s", offsetof(Socket, bind_to_device), true }, { "DirectoryMode", bus_property_append_mode, "u", offsetof(Socket, directory_mode) }, { "SocketMode", bus_property_append_mode, "u", offsetof(Socket, socket_mode) }, + { "SocketUser", bus_property_append_string, "s", offsetof(Socket, socket_user), true }, + { "SocketGroup", bus_property_append_string, "s", offsetof(Socket, socket_group), true }, { "Accept", bus_property_append_bool, "b", offsetof(Socket, accept) }, { "KeepAlive", bus_property_append_bool, "b", offsetof(Socket, keep_alive) }, { "Priority", bus_property_append_int, "i", offsetof(Socket, priority) }, @@ -123,6 +133,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, } }; @@ -132,8 +145,11 @@ DBusHandlerResult bus_socket_message_handler(Unit *u, DBusConnection *c, DBusMes { "org.freedesktop.systemd1.Unit", bus_unit_properties, u }, { "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 }, { NULL, } }; + SELINUX_UNIT_ACCESS_CHECK(u, c, message, "status"); + return bus_default_message_handler(c, message, INTROSPECTION, INTERFACES_LIST, bps); }