SELinux.rst 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. =======
  2. SELinux
  3. =======
  4. If you want to use SELinux, chances are you will want
  5. to use the distro-provided policies, or install the
  6. latest reference policy release from
  7. http://oss.tresys.com/projects/refpolicy
  8. However, if you want to install a dummy policy for
  9. testing, you can do using ``mdp`` provided under
  10. scripts/selinux. Note that this requires the selinux
  11. userspace to be installed - in particular you will
  12. need checkpolicy to compile a kernel, and setfiles and
  13. fixfiles to label the filesystem.
  14. 1. Compile the kernel with selinux enabled.
  15. 2. Type ``make`` to compile ``mdp``.
  16. 3. Make sure that you are not running with
  17. SELinux enabled and a real policy. If
  18. you are, reboot with selinux disabled
  19. before continuing.
  20. 4. Run install_policy.sh::
  21. cd scripts/selinux
  22. sh install_policy.sh
  23. Step 4 will create a new dummy policy valid for your
  24. kernel, with a single selinux user, role, and type.
  25. It will compile the policy, will set your ``SELINUXTYPE`` to
  26. ``dummy`` in ``/etc/selinux/config``, install the compiled policy
  27. as ``dummy``, and relabel your filesystem.