selabel_open - Online Linux Manual PageSection : 3
Updated : 18 Jun 2007
Source :
Note : SELinux API documentation

NAMEselabel_open, selabel_close − userspace SELinux labeling interface

SYNOPSIS#include <selinux/selinux.h>
#include <selinux/label.h> struct selabel_handle *selabel_open(unsigned int backend, const struct selinux_opt *options,
unsigned nopt);
void selabel_close(struct selabel_handle *hnd);

DESCRIPTIONselabel_open() is used to initialize a labeling handle to be used for lookup operations. The backend argument specifies which backend is to be opened; the list of current backends appears in BACKENDS below. The options argument should be NULL or a pointer to an array of selinux_opt structures of length nopt: struct selinux_opt { int type; const char *value; };.ta The available option types are described in GLOBAL OPTIONS below as well as in the documentation for each individual backend. The return value on success is a non-NULL value for use in subsequent label operations. selabel_close() terminates use of a handle, freeing any internal resources associated with it. After this call has been made, the handle must not be used again.

GLOBAL OPTIONSGlobal options which may be passed to selabel_open() include the following: SELABEL_OPT_UNUSED  The option with a type code of zero is a no-op. Thus an array of options may be initizalized to zero and any untouched elements will not cause an error. SELABEL_OPT_VALIDATE  A non-null value for this option enables context validation. By default, security_check_context(3) is used; a custom validation function can be provided via selinux_set_callback(3). Note that an invalid context may not be treated as an error unless it is actually encountered during a lookup operation. SELABEL_OPT_DIGEST  A non-null value for this option enables the generation of an SHA256 digest of the spec files loaded as described in selabel_digest(3)

BACKENDSSELABEL_CTX_FILE  File contexts backend, described in selabel_file(5). SELABEL_CTX_MEDIA  Media contexts backend, described in selabel_media(5). SELABEL_CTX_X  X Windows contexts backend, described in selabel_x(5). SELABEL_CTX_DB  Database objects contexts backend, described in selabel_db(5).

RETURN VALUEA non-NULL handle value is returned on success. On error, NULL is returned and errno is set appropriately.

AUTHOREamon Walsh <ewalsh@tycho.nsa.gov>

SEE ALSOselabel_lookup(3), selabel_stats(3), selinux_set_callback(3), selinux(8)
0
Johanes Gumabo
Data Size   :   9,268 byte
man-selabel_open.3Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   3 / 181,572
Visitor ID   :     :  
Visitor IP   :   18.191.67.90   :  
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.

ERROR : Need New Coding :         (rof_ta|11|selabel_open.3|45|1|.ta )