Section: SELinux API documentation (3)
Updated: 1 January 2004
Return to Main Contents
security_getenforce, security_setenforce, security_deny_unknown - get or set the enforcing state of SELinux
int security_setenforce(int value);
returns 0 if SELinux is running in permissive mode, 1 if it is running in
enforcing mode, and -1 on error.
sets SELinux to enforcing mode if the value 1 is passed in, and sets it to
permissive mode if 0 is passed in. On success 0 is returned, on error -1 is
returns 0 if SELinux treats policy queries on undefined object classes or
permissions as being allowed, 1 if such queries are denied, and -1 on error.
- SEE ALSO
This document was created by
using the manual pages.
Time: 01:59:27 GMT, January 23, 2018