1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 02:21:44 +03:00

cgroup: tighten manager_owns_host_root_cgroup() a bit

This tightening is not strictly necessary (as the m->cgroup_root check
further down does the same), but let's make this explicit.
This commit is contained in:
Lennart Poettering 2018-11-20 22:46:03 +01:00
parent 611c4f8afb
commit 28cfdc5aeb

View File

@ -39,6 +39,9 @@ bool manager_owns_host_root_cgroup(Manager *m) {
* appears to be no nice way to detect whether we are in a CLONE_NEWCGROUP namespace we instead just check if
* we run in any kind of container virtualization. */
if (MANAGER_IS_USER(m))
return false;
if (detect_container() > 0)
return false;