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

NAME

6       selinux_getenforcemode - get the enforcing state of SELinux
7

SYNOPSIS

9       #include <selinux/selinux.h>
10
11       int selinux_getenforcemode(int *enforce);
12
13
14

DESCRIPTION

16       selinux_getenforcemode  Reads  the  contents of the /etc/selinux/config
17       file to determine how the system was setup to run SELinux.
18
19       Sets the value of enforce to 1 if SELinux should be  run  in  enforcing
20       mode.   Sets the value of enforce to 0 if SELinux should be run in per‐
21       missive mode.  Sets the value of enforce to -1  if  SELinux  should  be
22       disabled.
23

RETURN VALUE

25       On success, zero is returned.  On failure, -1 is returned.
26
27

SEE ALSO

29       selinux(8)
30
31
32
33
34
35dwalsh@redhat.com                 25 May 2004        selinux_getenforcemode(3)
Impressum