2008-08-19 19:30:36 +00:00
|
|
|
.TH "selinux_getenforcemode" "3" "25 May 2004" "dwalsh@redhat.com" "SELinux API documentation"
|
|
|
|
.SH "NAME"
|
|
|
|
selinux_getenforcemode \- get the enforcing state of SELinux
|
2012-11-13 20:15:34 +00:00
|
|
|
.
|
2008-08-19 19:30:36 +00:00
|
|
|
.SH "SYNOPSIS"
|
|
|
|
.B #include <selinux/selinux.h>
|
|
|
|
.sp
|
2012-11-13 20:15:34 +00:00
|
|
|
.BI "int selinux_getenforcemode(int *" enforce );
|
|
|
|
.
|
2008-08-19 19:30:36 +00:00
|
|
|
.SH "DESCRIPTION"
|
2012-11-13 20:15:34 +00:00
|
|
|
.BR selinux_getenforcemode ()
|
|
|
|
Reads the contents of the
|
|
|
|
.I /etc/selinux/config
|
|
|
|
file to determine how the system was setup to run SELinux.
|
2008-08-19 19:30:36 +00:00
|
|
|
|
2012-11-13 20:15:34 +00:00
|
|
|
Sets the value of
|
|
|
|
.I enforce
|
|
|
|
to 1 if SELinux should be run in enforcing mode.
|
|
|
|
Sets the value of
|
|
|
|
.I enforce
|
|
|
|
to 0 if SELinux should be run in permissive mode.
|
|
|
|
Sets the value of
|
|
|
|
.I enforce
|
|
|
|
to \-1 if SELinux should be disabled.
|
|
|
|
.
|
2008-08-19 19:30:36 +00:00
|
|
|
.SH "RETURN VALUE"
|
|
|
|
On success, zero is returned.
|
2012-11-13 20:15:34 +00:00
|
|
|
On failure, \-1 is returned.
|
|
|
|
.
|
2008-08-19 19:30:36 +00:00
|
|
|
.SH "SEE ALSO"
|
|
|
|
.BR selinux "(8)"
|