Red Hat ENTERPRISE LINUX 5 - DEPLOYMENT Deployment Manual page 756

Hide thumbs Also See for ENTERPRISE LINUX 5 - DEPLOYMENT:
Table of Contents

Advertisement

Chapter 44. Security and SELinux
44.2.2.2.2. The /etc/selinux/ Directory
The /etc/selinux/ directory is the primary location for all policy files as well as the main
configuration file.
The following example shows sample contents of the /etc/selinux/ directory:
-rw-r--r--
1 root root
drwxr-xr-x
5 root root 4096 Sep 22 17:27 strict
drwxr-xr-x
5 root root 4096 Sep 22 17:28 targeted
The two subdirectories, strict/ and targeted/, are the specific directories where the policy files of
the same name (that is, strict and targeted) are contained.
44.2.2.3. SELinux Utilities
The following are some of the commonly used SELinux utilities:
• /usr/sbin/setenforce — Modifies in real-time the mode in which SELinux runs.
For example:
setenforce 1 — SELinux runs in enforcing mode.
setenforce 0 — SELinux runs in permissive mode.
To actually disable SELinux, you need to either specify the appropriate setenforce parameter
in /etc/sysconfig/selinux or pass the parameter selinux=0 to the kernel, either in /etc/
grub.conf or at boot time.
• /usr/sbin/sestatus -v — Displays the detailed status of a system running SELinux. The
following example shows an excerpt of sestatus -v output:
SELinux status:
SELinuxfs mount:
Current mode:
Mode from config file:
Policy version:
Policy from config file:
Process contexts:
Current context:
Init context:
/sbin/mingetty
• /usr/bin/newrole — Runs a new shell in a new context, or role. Policy must allow the transition
to the new role.
Note
This command is only available if you have the policycoreutils-newrole package
installed, which is required for the strict and MLS policies.
730
448 Sep 22 17:34 config
enabled
/selinux
enforcing
enforcing
21
targeted
user_u:system_r:unconfined_t:s0
system_u:system_r:init_t:s0
system_u:system_r:getty_t:s0

Advertisement

Table of Contents
loading

Table of Contents