diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-11-27 20:57:17 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-12-05 13:49:12 +0100 |
commit | 1cfdbe293f0e6266fc63bd807393f0813b8119f0 (patch) | |
tree | 6f85b7b7b8128afcc440f8554be466802676eb8b /src | |
parent | 8199d554c1d05acae2621e28e69b8efd819f789d (diff) | |
download | systemd-1cfdbe293f0e6266fc63bd807393f0813b8119f0.tar.gz |
cgroup: also include "cgroups.threads" in the list of files to chown
Also, add "cgroups.stat". It's read-only anyway, hence its UID/GID
ownership matters little, but it's probably a good idea to keep it
ownership in sync with the other read-only files such as
"cgroups.controllers".
Also, order the list of files alphabetically.
Diffstat (limited to 'src')
-rw-r--r-- | src/nspawn/nspawn-cgroup.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c index 1820f33c2c..4b07b38163 100644 --- a/src/nspawn/nspawn-cgroup.c +++ b/src/nspawn/nspawn-cgroup.c @@ -41,13 +41,15 @@ static int chown_cgroup_path(const char *path, uid_t uid_shift) { FOREACH_STRING(fn, ".", - "tasks", - "notify_on_release", - "cgroup.procs", - "cgroup.events", "cgroup.clone_children", "cgroup.controllers", - "cgroup.subtree_control") + "cgroup.events", + "cgroup.procs", + "cgroup.stat", + "cgroup.subtree_control", + "cgroup.threads", + "notify_on_release", + "tasks") if (fchownat(fd, fn, uid_shift, uid_shift, 0) < 0) log_full_errno(errno == ENOENT ? LOG_DEBUG : LOG_WARNING, errno, "Failed to chown \"%s/%s\", ignoring: %m", path, fn); |