security_getenforce - Online Linux Manual PageSection : 3
Updated : 1 January 2004
Source : russell@coker.com.au
Note : SELinux API documentation

NAMEsecurity_getenforce, security_setenforce, security_deny_unknown, security_reject_unknown, security_get_checkreqprot − get or set the enforcing state of SELinux

SYNOPSIS#include <selinux/selinux.h> int security_getenforce(void); int security_setenforce(int value); int security_deny_unknown(void); int security_reject_unknown(void); int security_get_checkreqprot(void);

DESCRIPTIONsecurity_getenforce() returns 0 if SELinux is running in permissive mode, 1 if it is running in enforcing mode, and −1 on error. 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. 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. security_reject_unknown() returns 1 if the current policy was built with handle-unknown=reject and SELinux would reject loading it, if it did not define all kernel object classes and permissions. In this state, when selinux_set_mapping() and selinux_check_access() are used with an undefined userspace class or permission, an error is returned and errno is set to EINVAL. It returns 0 if the current policy was built with handle-unknown=allow or handle-unknown=deny. In this state, policy queries are treated according to security_deny_unknown(). −1 is returned on error. security_get_checkreqprot() can be used to determine whether SELinux is configured to check the protection requested by the application or the actual protection that will be applied by the kernel (including the effects of READ_IMPLIES_EXEC) on mmap and mprotect calls. It returns 0 if SELinux checks the actual protection, 1 if it checks the requested protection, and −1 on error.

SEE ALSOselinux(8)"
0
Johanes Gumabo
Data Size   :   5,274 byte
man-security_deny_unknown.3Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   3 / 191,176
Visitor ID   :     :  
Visitor IP   :   3.14.131.115   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.