diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-07-01 02:45:02 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-07-01 02:45:02 +0200 |
commit | d7550a6752be85f98408a86b7ae23a033e9b2983 (patch) | |
tree | 2f0088c426f8f3a091d944a832a3d04a4f84f7ef /src/core/dbus-socket.c | |
parent | 9f2e86af0600e99cff00d1c92f9bb8d38f29896a (diff) |
core: move ControlGroup and Slice properties out of the dbus "Unit" interface
Slice/ControlGroup only really makes sense for unit types which actually
have cgroups attached to them, hence move them out of the generic Unit
interface and into the specific unit type interfaces.
These fields will continue to be part of Unit though, simply because
things are a log easier that way. However, regardless how this looks
internally we should keep things clean and independent of the specific
implementation of the inside.
Diffstat (limited to 'src/core/dbus-socket.c')
-rw-r--r-- | src/core/dbus-socket.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/dbus-socket.c b/src/core/dbus-socket.c index a431fa1921..da317edb86 100644 --- a/src/core/dbus-socket.c +++ b/src/core/dbus-socket.c @@ -34,6 +34,7 @@ " <property name=\"BindIPv6Only\" type=\"b\" access=\"read\"/>\n" \ " <property name=\"Backlog\" type=\"u\" access=\"read\"/>\n" \ " <property name=\"TimeoutUSec\" type=\"t\" access=\"read\"/>\n" \ + BUS_UNIT_CGROUP_INTERFACE \ BUS_EXEC_COMMAND_INTERFACE("ExecStartPre") \ BUS_EXEC_COMMAND_INTERFACE("ExecStartPost") \ BUS_EXEC_COMMAND_INTERFACE("ExecStopPre") \ @@ -196,18 +197,19 @@ static const BusProperty bus_socket_properties[] = { { "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, } + {} }; DBusHandlerResult bus_socket_message_handler(Unit *u, DBusConnection *c, DBusMessage *message) { Socket *s = SOCKET(u); const BusBoundProperties bps[] = { { "org.freedesktop.systemd1.Unit", bus_unit_properties, u }, + { "org.freedesktop.systemd1.Socket", bus_unit_cgroup_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 }, { "org.freedesktop.systemd1.Socket", bus_cgroup_context_properties, &s->cgroup_context }, - { NULL, } + {} }; SELINUX_UNIT_ACCESS_CHECK(u, c, message, "status"); |