Chris PeBenito 473ea7
.TH "security_getenforce" "3" "1 January 2004" "russell@coker.com.au" "SE Linux API documentation"
Chris PeBenito 473ea7
.SH "NAME"
Chris PeBenito 473ea7
security_getenforce, security_setenforce \- get or set the enforcing state of SE Linux
Chris PeBenito 473ea7
.SH "SYNOPSIS"
Chris PeBenito 473ea7
.B #include <selinux/selinux.h>
Chris PeBenito 473ea7
.sp
Chris PeBenito 473ea7
.B int security_getenforce();
Chris PeBenito 473ea7
.br
Chris PeBenito 473ea7
.BI "int security_setenforce(int "value );
Chris PeBenito 473ea7
Chris PeBenito 473ea7
.SH "DESCRIPTION"
Chris PeBenito 473ea7
.B security_getenforce
Chris PeBenito 473ea7
returns 0 if SE Linux is running in permissive mode, 1 if it is running in
Chris PeBenito 473ea7
enforcing mode, and -1 on error.
Chris PeBenito 473ea7
Chris PeBenito 473ea7
.B security_setenforce
Chris PeBenito 473ea7
sets SE Linux to enforcing mode if the value 1 is passed in, and sets it to
Chris PeBenito 473ea7
permissive mode if 0 is passed in.  On success 0 is returned, on error -1 is
Chris PeBenito 473ea7
returned.