chiark / gitweb /
main: don't mount cgroup controller unless PID == 1
authorLennart Poettering <lennart@poettering.net>
Fri, 22 Mar 2013 03:40:05 +0000 (04:40 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 22 Mar 2013 03:43:27 +0000 (04:43 +0100)
This completes c1dae1b3c9729fb8ab749dd4e2dad07e0fad7ed8 in a way.

src/core/main.c

index 01a6d41..21c0d27 100644 (file)
@@ -1582,7 +1582,7 @@ int main(int argc, char *argv[]) {
         if (getpid() == 1)
                 install_crash_handler();
 
         if (getpid() == 1)
                 install_crash_handler();
 
-        if (geteuid() == 0 && !getenv("SYSTEMD_SKIP_API_MOUNTS")) {
+        if (getpid() == 1) {
                 r = mount_cgroup_controllers(arg_join_controllers);
                 if (r < 0)
                         goto finish;
                 r = mount_cgroup_controllers(arg_join_controllers);
                 if (r < 0)
                         goto finish;