security_load_policy - Online Linux Manual PageSection : 3
Updated : 3 November 2009
Source : guido@trentalancia.com
Note : SELinux API documentation
NAMEsecurity_load_policy − load a new SELinux policy
SYNOPSIS#include <selinux/selinux.h> int security_load_policy(const void *data, size_t len); int selinux_mkload_policy(int preservebools); int selinux_init_load_policy(int *enforce);
DESCRIPTIONsecurity_load_policy() loads a new policy, returns 0 for success and −1 for error. selinux_mkload_policy() makes a policy image and loads it. This function provides a higher level interface for loading policy than security_load_policy(), internally determining the right policy version, locating and opening the policy file, mapping it into memory, manipulating it as needed for current boolean settings and/or local definitions, and then calling security_load_policy to load it. preservebools is a boolean flag indicating whether current policy boolean values should be preserved into the new policy (if 1) or reset to the saved policy settings (if 0). The former case is the default for policy reloads, while the latter case is an option for policy reloads but is primarily used for the initial policy load. selinux_init_load_policy() performs the initial policy load. This function determines the desired enforcing mode, sets the enforce argument accordingly for the caller to use, sets the SELinux kernel enforcing status to match it, and loads the policy. It also internally handles the initial selinuxfs mount required to perform these actions. It should also be noted that after the initial policy load, the SELinux kernel code cannot anymore be disabled and the selinuxfs cannot be unmounted using a call to security_disable(3). Therefore, after the initial policy load, the only operational changes are those permitted by security_setenforce(3) (i.e. eventually setting the framework in permissive mode rather than in enforcing one).
RETURN VALUEReturns zero on success or −1 on error.
AUTHORThis manual page has been written by Guido Trentalancia <guido@trentalancia.com>
SEE ALSOselinux(8), security_disable (3), setenforce (8) 0
Johanes Gumabo
Data Size : 5,708 byte
man-security_mkload_policy.3Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 2 / 237,708
Visitor ID : :
Visitor IP : 13.59.183.77 :
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.