Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
oomd: always allow root-owned cgroups to set ManagedOOMPreference
Commit 652a4ef ("oomd: loosen the restriction on ManagedOOMPreference") made the change to allow ManagedOOMPreference on a cgroup candidate when the monitored cgroup and cgroup candidate are owned by the same user. The commit assumed that this check was sufficient to continue allowing ManagedOOMPreference on all cgroups owned by root. However, it caused a regression for unprivileged LXD containers where e.g. /sys/fs/cgroup is owned by nobody (uid=65534). Fix this by explicitly allowing the ManagedOOMPreference if uid == 0 in oomd_fetch_cgroup_oom_preference(). (cherry picked from commit 8918609)
- Loading branch information