]> git.ipfire.org Git - thirdparty/systemd.git/commit
cgroup: rework which files we chown() on delegation
authorLennart Poettering <lennart@poettering.net>
Fri, 22 Sep 2017 17:58:24 +0000 (19:58 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 22 Sep 2017 18:00:53 +0000 (20:00 +0200)
commit40853aa53fae07bf891206fb1adf3b06f36ab888
tree80f8922ace8f31d60860ba3cdf17d2f4909c457f
parent5beac75e44331e1a99103058bb86f958d5f69d54
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