1security_getenforce(3)     SELinux API documentation    security_getenforce(3)
2
3
4

NAME

6       security_getenforce,  security_setenforce,  security_deny_unknown - get
7       or set the enforcing state of SELinux
8

SYNOPSIS

10       #include <selinux/selinux.h>
11
12       int security_getenforce(void);
13
14       int security_setenforce(int value);
15
16       int security_deny_unknown(void);
17

DESCRIPTION

19       security_getenforce() returns 0 if SELinux  is  running  in  permissive
20       mode, 1 if it is running in enforcing mode, and -1 on error.
21
22       security_setenforce()  sets SELinux to enforcing mode if the value 1 is
23       passed in, and sets it to permissive mode if 0 is passed in.   On  suc‐
24       cess 0 is returned, on error -1 is returned.
25
26       security_deny_unknown()  returns  0 if SELinux treats policy queries on
27       undefined object classes or permissions as being  allowed,  1  if  such
28       queries are denied, and -1 on error.
29

SEE ALSO

31       selinux(8)
32
33
34
35russell@coker.com.au            1 January 2004          security_getenforce(3)
Impressum