Not all situations can be perfectly defined by policy writers. At times, we will need to make modifications to the SELinux policy. As long as the changes involve adding rules, we can create additional SELinux modules to enhance the policy. If the change is more intrusive, we might need to remove an existing SELinux module and replace it with an updated one.
Let's start with SELinux policy modules.
SELinux policy modules are, as mentioned at the beginning of this book, sets of SELinux rules that can be loaded and unloaded. They are packaged as files with the
.pp suffix and can be loaded and unloaded using the
semodule command as follows:
# cd /usr/share/selinux/mcs # semodule -i screen.pp ...