chiark / gitweb /
Fix SELinux labels in cgroup filesystem root directory (#7496)
authorKrzysztof Nowicki <krzysztof.a.nowicki+github@gmail.com>
Thu, 30 Nov 2017 10:59:29 +0000 (11:59 +0100)
committerSven Eden <yamakuzure@gmx.net>
Thu, 30 Nov 2017 10:59:29 +0000 (11:59 +0100)
commitdab5bf7faede9be76986f2be5f2309082329da7d
tree614740af723bf9d3675c2039676c6c105fdd79c4
parentdbb2a1701b25ee00e2f6eb069ccda28cfc0ece7a
Fix SELinux labels in cgroup filesystem root directory (#7496)

When using SELinux with legacy cgroups the tmpfs on /sys/fs/cgroup is by
default labelled as tmpfs_t. This label is also inherited by the "cpu"
and "cpuacct" symbolic links. Unfortunately the policy expects them to
be labelled as cgroup_t, which is used for all the actual cgroup
filesystems. Failure to do so results in a stream of denials.

This state cannot be fixed reliably when the cgroup filesystem structure
is set-up as the SELinux policy is not yet loaded at this
moment. It also cannot be fixed later as the root of the cgroup
filesystem is remounted read-only. In order to fix it the root of the
cgroup filesystem needs to be temporary remounted read-write, relabelled
and remounted back read-only.
src/core/mount-setup.c