| 1 |
.TH "selinux_getenforcemode" "3" "25 May 2004" "[email protected]" "SELinux API documentation" |
| 2 |
.SH "NAME" |
| 3 |
selinux_getenforcemode \- get the enforcing state of SELinux |
| 4 |
. |
| 5 |
.SH "SYNOPSIS" |
| 6 |
.B #include <selinux/selinux.h> |
| 7 |
.sp |
| 8 |
.BI "int selinux_getenforcemode(int *" enforce ); |
| 9 |
. |
| 10 |
.SH "DESCRIPTION" |
| 11 |
.BR selinux_getenforcemode () |
| 12 |
Reads the contents of the |
| 13 |
.I /etc/selinux/config |
| 14 |
file to determine how the system was setup to run SELinux. |
| 15 |
|
| 16 |
Sets the value of |
| 17 |
.I enforce |
| 18 |
to 1 if SELinux should be run in enforcing mode. |
| 19 |
Sets the value of |
| 20 |
.I enforce |
| 21 |
to 0 if SELinux should be run in permissive mode. |
| 22 |
Sets the value of |
| 23 |
.I enforce |
| 24 |
to \-1 if SELinux should be disabled. |
| 25 |
. |
| 26 |
.SH "RETURN VALUE" |
| 27 |
On success, zero is returned. |
| 28 |
On failure, \-1 is returned. |
| 29 |
. |
| 30 |
.SH "SEE ALSO" |
| 31 |
.BR selinux "(8)" |