diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-11-05 17:57:23 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-11-05 18:49:14 +0100 |
commit | a931ad47a8623163a29d898224d8a8c1177ffdaf (patch) | |
tree | 34741242cc98bf038f3b57058e4b283b0d53b275 /src/machine/machined-dbus.c | |
parent | c962cb68d5754690cbe924a0d0b4251053217783 (diff) |
core: introduce new Delegate=yes/no property controlling creation of cgroup subhierarchies
For priviliged units this resource control property ensures that the
processes have all controllers systemd manages enabled.
For unpriviliged services (those with User= set) this ensures that
access rights to the service cgroup is granted to the user in question,
to create further subgroups. Note that this only applies to the
name=systemd hierarchy though, as access to other controllers is not
safe for unpriviliged processes.
Delegate=yes should be set for container scopes where a systemd instance
inside the container shall manage the hierarchies below its own cgroup
and have access to all controllers.
Delegate=yes should also be set for user@.service, so that systemd
--user can run, controlling its own cgroup tree.
This commit changes machined, systemd-nspawn@.service and user@.service
to set this boolean, in order to ensure that container management will
just work, and the user systemd instance can run fine.
Diffstat (limited to 'src/machine/machined-dbus.c')
-rw-r--r-- | src/machine/machined-dbus.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/machine/machined-dbus.c b/src/machine/machined-dbus.c index 3c7d4be8d2..7f8c631ef6 100644 --- a/src/machine/machined-dbus.c +++ b/src/machine/machined-dbus.c @@ -622,6 +622,10 @@ int manager_start_scope( if (r < 0) return r; + r = sd_bus_message_append(m, "(sv)", "Delegate", "b", 1); + if (r < 0) + return r; + if (more_properties) { r = sd_bus_message_copy(m, more_properties, true); if (r < 0) |