File: security_getenforce.3

package info (click to toggle)
libselinux 1.22-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,916 kB
  • ctags: 1,580
  • sloc: ansic: 7,448; makefile: 82; sh: 78
file content (19 lines) | stat: -rw-r--r-- 662 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
.TH "security_getenforce" "3" "1 January 2004" "russell@coker.com.au" "SE Linux API documentation"
.SH "NAME"
security_getenforce, security_setenforce \- get or set the enforcing state of SE Linux
.SH "SYNOPSIS"
.B #include <selinux/selinux.h>
.sp
.B int security_getenforce();
.br
.BI "int security_setenforce(int "value );

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

.B security_setenforce
sets SE Linux 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.