mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-18 04:04:34 +00:00
1cbce56115
Signed-off-by: Jacob M Cutright <cutrightjm@stl.sh> Acked-by: Petr Lautrbach <plautrba@redhat.com>
131 lines
5.0 KiB
Groff
131 lines
5.0 KiB
Groff
.TH "selinux_config" "5" "18 Nov 2011" "Security Enhanced Linux" "SELinux configuration file"
|
|
|
|
.SH "NAME"
|
|
config \- The SELinux sub-system configuration file.
|
|
|
|
.SH "DESCRIPTION"
|
|
The SELinux \fIconfig\fR file controls the state of SELinux regarding:
|
|
.RS
|
|
.IP "1." 4
|
|
The policy enforcement status \- \fIenforcing\fR, \fIpermissive\fR or \fIdisabled\fR.
|
|
.IP "2." 4
|
|
The policy name or type that forms a path to the policy to be loaded and its supporting configuration files.
|
|
.IP "3." 4
|
|
How SELinux-aware login applications should behave if no valid SELinux users are configured.
|
|
.IP "4." 4
|
|
Whether the system is to be relabeled or not.
|
|
.RE
|
|
|
|
The entries controlling these functions are described in the \fBFILE FORMAT\fR section.
|
|
.sp
|
|
The fully qualified path name of the SELinux configuration file is \fI/etc/selinux/config\fR.
|
|
.sp
|
|
If the \fIconfig\fR file is missing or corrupt, then no SELinux policy is loaded (i.e. SELinux is disabled).
|
|
.sp
|
|
The \fBsestatus\fR (8) command and the libselinux function \fBselinux_path\fR (3) will return the location of the \fIconfig\fR file.
|
|
|
|
.SH "FILE FORMAT"
|
|
The \fIconfig\fR file supports the following parameters:
|
|
.sp
|
|
.RS
|
|
\fBSELINUX = \fIenforcing\fR | \fIpermissive\fR | \fIdisabled\fR
|
|
.br
|
|
\fBSELINUXTYPE = \fIpolicy_name\fR
|
|
.br
|
|
\fBREQUIRESEUSERS = \fI0\fR | \fI1\fR
|
|
.br
|
|
\fBAUTORELABEL = \fI0\fR | \fI1\fR
|
|
.RE
|
|
.sp
|
|
Where:
|
|
.br
|
|
.B SELINUX
|
|
.RS
|
|
This entry can contain one of three values:
|
|
.RS
|
|
.IP \fIenforcing\fR 4
|
|
SELinux security policy is enforced.
|
|
.IP \fIpermissive\fR 4
|
|
SELinux security policy is not enforced but logs the warnings (i.e. the action is allowed to proceed).
|
|
.IP \fIdisabled\fR
|
|
No SELinux policy is loaded. This option was used to disable SELinux completely, which is now deprecated. Use the \fBselinux=0\fR kernel boot option instead (see \fBselinux\fR(8)).
|
|
.RE
|
|
.sp
|
|
The entry can be determined using the \fBsestatus\fR(8) command or \fBselinux_getenforcemode\fR(3).
|
|
.RE
|
|
.sp
|
|
.B SELINUXTYPE
|
|
.RS
|
|
The \fIpolicy_name\fR entry is used to identify the policy type, and becomes the directory name of where the policy and its configuration files are located.
|
|
.sp
|
|
The entry can be determined using the \fBsestatus\fR(8) command or \fBselinux_getpolicytype\fR(3).
|
|
.sp
|
|
The \fIpolicy_name\fR is relative to a path that is defined within the SELinux subsystem that can be retrieved by using \fBselinux_path\fR(3). An example entry retrieved by \fBselinux_path\fR(3) is:
|
|
.br
|
|
.RS
|
|
.I /etc/selinux/
|
|
.RE
|
|
.sp
|
|
The \fIpolicy_name\fR is then appended to this and becomes the 'policy root' location that can be retrieved by \fBselinux_policy_root_path\fR(3). An example entry retrieved is:
|
|
.RS
|
|
.I /etc/selinux/targeted
|
|
.RE
|
|
.sp
|
|
The actual binary policy is located relative to this directory and also has a policy name pre-allocated. This information can be retrieved using \fBselinux_binary_policy_path\fR(3). An example entry retrieved by \fBselinux_binary_policy_path\fR(3) is:
|
|
.br
|
|
.RS
|
|
.I /etc/selinux/targeted/policy/policy
|
|
.RE
|
|
.sp
|
|
The binary policy name has by convention the SELinux policy version that it supports appended to it. The maximum policy version supported by the kernel can be determined using the \fBsestatus\fR(8) command or \fBsecurity_policyvers\fR(3). An example binary policy file with the version is:
|
|
.br
|
|
.RS
|
|
.I /etc/selinux/targeted/policy/policy.24
|
|
.RE
|
|
.RE
|
|
.sp
|
|
.B REQUIRESEUSERS
|
|
.RS
|
|
This optional entry can be used to fail a login if there is no matching or default entry in the
|
|
.BR seusers "(5) file or if the " seusers " file is missing. "
|
|
.sp
|
|
It is checked by \fBgetseuserbyname\fR(3) that is called by SELinux-aware login applications such as \fBPAM\fR(8).
|
|
.sp
|
|
If set to \fI0\fR or the entry missing:
|
|
.RS
|
|
.BR getseuserbyname "(3) will return the GNU / Linux user name as the SELinux user."
|
|
.RE
|
|
.sp
|
|
If set to \fI1\fR:
|
|
.RS
|
|
.BR getseuserbyname "(3) will fail."
|
|
.RE
|
|
.sp
|
|
The \fBgetseuserbyname\fR(3) man page should be consulted for its use. The format of the \fIseusers\fR file is shown in \fBseusers\fR(5).
|
|
.sp
|
|
.RE
|
|
.sp
|
|
.B AUTORELABEL
|
|
.RS
|
|
This is an optional entry that allows the file system to be relabeled.
|
|
.sp
|
|
If set to \fI0\fR and there is a file called \fI.autorelabel\fR in the root directory, then on a reboot, the loader will drop to a shell where a root login is required. An administrator can then manually relabel the file system.
|
|
.sp
|
|
If set to \fI1\fR or no entry present (the default) and there is a \fI.autorelabel\fR file in the root directory, then the file system will be automatically relabeled using \fBfixfiles \-F restore\fR
|
|
.sp
|
|
In both cases the \fI/.autorelabel\fR file will be removed so that relabeling is not done again.
|
|
.RE
|
|
.sp
|
|
|
|
.SH "EXAMPLE"
|
|
This example \fIconfig\fR file shows the minimum contents for a system to run SELinux in enforcing mode, with a \fIpolicy_name\fR of 'targeted':
|
|
.sp
|
|
.RS
|
|
SELINUX = enforcing
|
|
.br
|
|
SELINUXTYPE = targeted
|
|
.RE
|
|
|
|
.SH "SEE ALSO"
|
|
.BR selinux "(8), " sestatus "(8), " selinux_path "(3), " selinux_policy_root_path "(3), " selinux_binary_policy_path "(3), " getseuserbyname "(3), " PAM "(8), " fixfiles "(8), " selinux_mkload_policy "(3), " selinux_getpolicytype "(3), " security_policyvers "(3), " selinux_getenforcemode "(3), " seusers "(5) "
|