1security_getenforce(3)    SE Linux API documentation    security_getenforce(3)
2
3
4

NAME

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

SYNOPSIS

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

DESCRIPTION

18       security_getenforce returns 0 if SE  Linux  is  running  in  permissive
19       mode, 1 if it is running in enforcing mode, and -1 on error.
20
21       security_setenforce  sets  SE Linux to enforcing mode if the value 1 is
22       passed in, and sets it to permissive mode if 0 is passed in.   On  suc‐
23       cess 0 is returned, on error -1 is returned.
24
25

SEE ALSO

27       selinux(8)
28
29
30
31
32russell@coker.com.au            1 January 2004          security_getenforce(3)
Impressum