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)
commit346e1907ca4800b8998c40138f9f2c1fcd53891b
tree576450aba0ea58b3988ff6940c85dba1833c4fab
parent4db9ee58f14bba794286d1c9926c18815b02b585
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