File: security_getenforce.3

package info (click to toggle)
libselinux 2.0.96-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 2,348 kB
  • ctags: 4,345
  • sloc: ansic: 24,218; python: 2,086; sh: 232; makefile: 219
file content (29 lines) | stat: -rw-r--r-- 931 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.TH "security_getenforce" "3" "1 January 2004" "russell@coker.com.au" "SELinux API documentation"
.SH "NAME"
security_getenforce, security_setenforce, security_deny_unknown \- get or set the enforcing state of SELinux
.SH "SYNOPSIS"
.B #include <selinux/selinux.h>
.sp
.B int security_getenforce(void);

.BI "int security_setenforce(int "value );

.B int security_deny_unknown(void);

.SH "DESCRIPTION"
.B security_getenforce
returns 0 if SELinux is running in permissive mode, 1 if it is running in
enforcing mode, and -1 on error.

.B security_setenforce
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
returned.

.B security_deny_unknown
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.

.SH "SEE ALSO"
.BR selinux "(8)"