]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
cgroup: also include "cgroups.threads" in the list of files to chown
authorLennart Poettering <lennart@poettering.net>
Mon, 27 Nov 2017 19:57:17 +0000 (20:57 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 5 Dec 2017 12:49:12 +0000 (13:49 +0100)
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.

src/nspawn/nspawn-cgroup.c

index 1820f33c2c86190e0887e5b6b5cf39b722dd3cd2..4b07b38163d7bb9d011923a290d9df9e3e4259a9 100644 (file)
@@ -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);