50.2.8. Changing the Policy
This section provides a brief introduction to using customized policies on your system. A full discussion of this topic is beyond the scope of this document.
To load a different policy on your system, change the following line in
/etc/sysconfig/selinux
:
SELINUXTYPE=<policyname>
where <policyname> is the policy name directory under
/etc/selinux/
. This assumes that you have the custom policy installed. After changing the SELINUXTYPE
parameter, run the following commands:
touch /.autorelabel
reboot
Use the following procedure to load a different policy using the system-config-selinux utility:
Note
You need administrator privileges to perform this procedure.
- Ensure that the complete directory structure for the required policy exists under
/etc/selinux
. - On themenu, point to and then click to display the Security Level Configuration dialog box.
- Click the SELinux tab.
- In the Policy Type list, select the policy that you want to load, and then click . This list is only visible if more than one policy is installed.
- Restart the machine for the change to take effect.
![Using the Security Level Configuration dialog box to load a custom policy.](https://access.redhat.com/webassets/avalon/d/Red_Hat_Enterprise_Linux-5-Deployment_Guide-en-US/images/561e4623c3dd377b359df5d5da78d168/Load_New_Policy.png)
Figure 50.2. Using the Security Level Configuration dialog box to load a custom policy.