buildroot: ensure /sys/fs/selinux is read-only
Make sure "/sys/fs/selinux" is read-only, otherwise libselinux and tools will assume that SELinux is available and active and in turn use /sys/fs/selinux to e.g. verify the file systems labels; this will then prevent setting unknown labels via `setfiles`.
This commit is contained in:
parent
6e63baa0d4
commit
41cf4bf2d3
1 changed files with 1 additions and 0 deletions
|
|
@ -150,6 +150,7 @@ class BuildRoot(contextlib.AbstractContextManager):
|
|||
# Setup API file-systems.
|
||||
mounts += ["--proc", "/proc"]
|
||||
mounts += ["--bind", "/sys", "/sys"]
|
||||
mounts += ["--ro-bind-try", "/sys/fs/selinux", "/sys/fs/selinux"]
|
||||
|
||||
# We execute our own modules by bind-mounting them from the host into
|
||||
# the build-root. We have minimal requirements on the build-root, so
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue