chiark / gitweb /
cgroup: rework which files we chown() on delegation
authorLennart Poettering <lennart@poettering.net>
Fri, 22 Sep 2017 17:58:24 +0000 (19:58 +0200)
committerSven Eden <yamakuzure@gmx.net>
Fri, 22 Sep 2017 17:58:24 +0000 (19:58 +0200)
commitdda0f77dcedceece0d67d24eb37bbcdca897ee6d
tree54ebe65e5f60976b1a4d9839293ccfc12aa1d313
parent02a0ffa93bc95561f744bc42c8710fc6795bcbc1
cgroup: rework which files we chown() on delegation

On cgroupsv2 we should also chown()/chmod() the subtree_control file,
so that children can use controllers the way they like.

On cgroupsv1 we should also chown()/chmod() cgroups.clone_children, as
not setting this for new cgroups makes little sense, and hence delegated
clients should be able to write to it.

Note that error handling for both cases is different. subtree_control
matters so we check for errors, but the clone_children/tasks stuff
doesn't really, as it's legacy stuff. Hence we only log errors and
proceed.

Fixes: #6216
src/basic/cgroup-util.c