We can always maintain our own SELinux policy modules as well. To accomplish this, we need to have at least a file with the .te
suffix (which stands for type enforcement) and optionally an .fc
file (file context) and .if
(interface). All these files need to have the same base name, which will be used as a module name later.
There are two "formats" in which SELinux policy modules can be written: the native one, and the reference policy one. The native one does not understand reference policy macros but remains supported (as the reference policy builds on this). Formats using the reference policy support all functions of the "native" one as well, so this format is becoming more and more popular for building and maintaining our own modules.