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
18

DESCRIPTION

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

SEE ALSO

33       selinux(8)
34
35
36
37
38russell@coker.com.au            1 January 2004          security_getenforce(3)
Impressum