Skip to content

Commit

Permalink
doc: ReSTify SELinux.txt
Browse files Browse the repository at this point in the history
Adjusts for ReST markup and moves under LSM admin guide.

Cc: Paul Moore <[email protected]>
Signed-off-by: Kees Cook <[email protected]>
Signed-off-by: Jonathan Corbet <[email protected]>
  • Loading branch information
kees authored and Jonathan Corbet committed May 18, 2017
1 parent 504f231 commit 229fd05
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
=======
SELinux
=======

If you want to use SELinux, chances are you will want
to use the distro-provided policies, or install the
latest reference policy release from

http://oss.tresys.com/projects/refpolicy

However, if you want to install a dummy policy for
testing, you can do using 'mdp' provided under
testing, you can do using ``mdp`` provided under
scripts/selinux. Note that this requires the selinux
userspace to be installed - in particular you will
need checkpolicy to compile a kernel, and setfiles and
fixfiles to label the filesystem.

1. Compile the kernel with selinux enabled.
2. Type 'make' to compile mdp.
2. Type ``make`` to compile ``mdp``.
3. Make sure that you are not running with
SELinux enabled and a real policy. If
you are, reboot with selinux disabled
before continuing.
4. Run install_policy.sh:
4. Run install_policy.sh::

cd scripts/selinux
sh install_policy.sh

Step 4 will create a new dummy policy valid for your
kernel, with a single selinux user, role, and type.
It will compile the policy, will set your SELINUXTYPE to
dummy in /etc/selinux/config, install the compiled policy
as 'dummy', and relabel your filesystem.
It will compile the policy, will set your ``SELINUXTYPE`` to
``dummy`` in ``/etc/selinux/config``, install the compiled policy
as ``dummy``, and relabel your filesystem.
5 changes: 5 additions & 0 deletions Documentation/admin-guide/LSM/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@ will always include the capability module. The list reflects the
order in which checks are made. The capability module will always
be first, followed by any "minor" modules (e.g. Yama) and then
the one "major" module (e.g. SELinux) if there is one configured.

.. toctree::
:maxdepth: 1

SELinux
2 changes: 0 additions & 2 deletions Documentation/security/00-INDEX
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
00-INDEX
- this file.
SELinux.txt
- how to get started with the SELinux security enhancement.
Smack.txt
- documentation on the Smack Linux Security Module.
Yama.txt
Expand Down
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -11551,6 +11551,7 @@ S: Supported
F: include/linux/selinux*
F: security/selinux/
F: scripts/selinux/
F: Documentation/admin-guide/LSM/SELinux.rst

APPARMOR SECURITY MODULE
M: John Johansen <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion scripts/selinux/README
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Please see Documentation/security/SELinux.txt for information on
Please see Documentation/admin-guide/LSM/SELinux.rst for information on
installing a dummy SELinux policy.

0 comments on commit 229fd05

Please sign in to comment.