5.11.2. Enabling MLS in SELinux Note It is not recommended to use the MLS policy on a system that is running the X Window System. Follow these steps to enable the SELinux MLS policy on your system. Install the selinux-policy-mls package: Before the MLS policy is enabled, each file on the file system must be relabeled with an MLS label. When the file system is relabeled, confined domains may be denied access, which may prevent your system from booting correctly. To prevent this from happening, configure SELINUX=permissive in the /etc/selinux/config file. Also, enable the MLS policy by configuring SELINUXTYPE=mls . Your configuration file should look like this: Make sure SELinux is running in the permissive mode: Create the .autorelabel file in root's home directory to ensure that files are relabeled upon reboot: Reboot your system. During the boot, all file systems will be relabeled according to the MLS policy. The label process labels all files with an appropriate SELinux context: Each * (asterisk) character on the bottom line represents 1000 files that have been labeled. In the above example, eleven * characters represent 11000 files which have been labeled. The time it takes to label all files depends upon the number of files on the system, and the speed of the hard disk drives. On modern systems, this process can take as little as 10 minutes. Once the labeling process finishes, the system will automatically reboot. In permissive mode, SELinux policy is not enforced, but denials are still logged for actions that would have been denied if running in enforcing mode. Before changing to enforcing mode, as the Linux root user, run the grep "SELinux is preventing" /var/log/messages command to confirm that SELinux did not deny actions during the last boot. If SELinux did not deny actions during the last boot, this command does not return any output. Refer to Chapter 8, Troubleshooting for troubleshooting information if SELinux denied access during boot. If there were no denial messages in /var/log/messages , or you have resolved all existing denials, configure SELINUX=enforcing in the /etc/selinux/config file: Reboot your system and make sure SELinux is running in enforcing mode: and the MLS policy is enabled:

Commands:
~]# yum install selinux-policy-mls
This file controls the state of SELinux on the system. SELINUX= can take one of these three values: enforcing - SELinux security policy is enforced. permissive - SELinux prints warnings instead of enforcing. disabled - No SELinux policy is loaded. SELINUX=permissive SELINUXTYPE= can take one of these two values: targeted - Targeted processes are protected, mls - Multi Level Security protection. SELINUXTYPE=mls
~]# setenforce 0 ~]# getenforce Permissive
~]# touch /.autorelabel
*** Warning -- SELinux mls policy relabel is required. *** Relabeling could take a very long time, depending on file *** system size and speed of hard drives. ***********
This file controls the state of SELinux on the system. SELINUX= can take one of these three values: enforcing - SELinux security policy is enforced. permissive - SELinux prints warnings instead of enforcing. disabled - No SELinux policy is loaded. SELINUX=enforcing SELINUXTYPE= can take one of these two values: targeted - Targeted processes are protected, mls - Multi Level Security protection. SELINUXTYPE=mls
~]USD getenforce Enforcing
~]# sestatus |grep mls Policy from config file: mls