Introducing the reference policy
The reference policy, available through https://github.com/SELinuxProject/refpolicy, is the source SELinux policy for most, if not all, Linux distributions out there. While it is possible that the plain reference policy will not work out of the box for any Linux distribution (as many Linux distributions add their own touch to the policy, or adjust it so it fits the applications and support tooling installed), the development methodology, structure, and approach used by the reference policy are applicable to all major distribution policies.
We recommend checking out the SELinux policy of your distribution to see and easily modify SELinux policies for the system. In this chapter, we'll use a checkout of the reference policy:
$ git clone https://github.com/SELinuxProject/refpolicy.git
The SELinux policy repositories for the Linux distributions should be documented by the distributions themselves. A few example repositories are listed next...