Switch to "mcs" SELinux policy

We're going to want the ability for processes to have unique categories,
to enforce separation of container processes.  Gentoo's SELinux policy
supports both Multi-Category Security and Multi-Level Security modes,
although the latter does not seem to work out of the box.
gentoo
Dustin 2023-03-12 21:34:15 -05:00
parent cb7e0a5819
commit e9b21b0ca0
3 changed files with 5 additions and 3 deletions

View File

@ -100,10 +100,10 @@ setfiles \
-F \
-m \
-r /mnt/gentoo \
-c /mnt/gentoo/etc/selinux/strict/policy/policy.* \
-c /mnt/gentoo/etc/selinux/mcs/policy/policy.* \
-e /mnt/gentoo/var/db/pkg \
-e /mnt/gentoo/etc/portage \
/mnt/gentoo/etc/selinux/strict/contexts/files/file_contexts \
/mnt/gentoo/etc/selinux/mcs/contexts/files/file_contexts \
/mnt/gentoo
touch /mnt/gentoo/usr

View File

@ -12,4 +12,4 @@ SELINUX=enforcing
# mls - Full SELinux protection with Multi-Level Security
# mcs - Full SELinux protection with Multi-Category Security
# (mls, but only one sensitivity level)
SELINUXTYPE=strict
SELINUXTYPE=mcs

View File

@ -0,0 +1,2 @@
USE="${USE} -unconfined"
POLICY_TYPES=mcs