2008-08-19 21:30:36 +02:00
|
|
|
.TH "security_getenforce" "3" "1 January 2004" "russell@coker.com.au" "SELinux API documentation"
|
|
|
|
.SH "NAME"
|
2009-04-08 04:48:01 +02:00
|
|
|
security_getenforce, security_setenforce, security_deny_unknown \- get or set the enforcing state of SELinux
|
2012-11-13 21:15:34 +01:00
|
|
|
.
|
2008-08-19 21:30:36 +02:00
|
|
|
.SH "SYNOPSIS"
|
|
|
|
.B #include <selinux/selinux.h>
|
|
|
|
.sp
|
2009-04-08 04:48:01 +02:00
|
|
|
.B int security_getenforce(void);
|
2012-11-13 21:15:34 +01:00
|
|
|
.sp
|
2008-08-19 21:30:36 +02:00
|
|
|
.BI "int security_setenforce(int "value );
|
2012-11-13 21:15:34 +01:00
|
|
|
.sp
|
2009-04-08 04:48:01 +02:00
|
|
|
.B int security_deny_unknown(void);
|
2012-11-13 21:15:34 +01:00
|
|
|
.
|
2008-08-19 21:30:36 +02:00
|
|
|
.SH "DESCRIPTION"
|
2012-11-13 21:15:34 +01:00
|
|
|
.BR security_getenforce ()
|
2008-08-19 21:30:36 +02:00
|
|
|
returns 0 if SELinux is running in permissive mode, 1 if it is running in
|
2012-11-13 21:15:34 +01:00
|
|
|
enforcing mode, and \-1 on error.
|
2008-08-19 21:30:36 +02:00
|
|
|
|
2012-11-13 21:15:34 +01:00
|
|
|
.BR security_setenforce ()
|
2008-08-19 21:30:36 +02:00
|
|
|
sets SELinux to enforcing mode if the value 1 is passed in, and sets it to
|
2012-11-13 21:15:34 +01:00
|
|
|
permissive mode if 0 is passed in. On success 0 is returned, on error \-1 is
|
2008-08-19 21:30:36 +02:00
|
|
|
returned.
|
|
|
|
|
2012-11-13 21:15:34 +01:00
|
|
|
.BR security_deny_unknown ()
|
2009-04-08 04:48:01 +02:00
|
|
|
returns 0 if SELinux treats policy queries on undefined object classes or
|
2012-11-13 21:15:34 +01:00
|
|
|
permissions as being allowed, 1 if such queries are denied, and \-1 on error.
|
|
|
|
.
|
2008-08-19 21:30:36 +02:00
|
|
|
.SH "SEE ALSO"
|
|
|
|
.BR selinux "(8)"
|