avc_context_to_sid - Online Linux Manual PageSection : 3
Updated : 27 May 2004
Source :
Note : SELinux API documentation

NAMEavc_context_to_sid, avc_sid_to_context, avc_get_initial_sid − obtain and manipulate SELinux security ID's

SYNOPSIS#include <selinux/selinux.h>
#include <selinux/avc.h> int avc_context_to_sid(char *ctx, security_id_t *sid); int avc_sid_to_context(security_id_t sid, char **ctx); int avc_get_initial_sid(const char *name, security_id_t *sid);

DESCRIPTIONSecurity ID's (SID's) are opaque representations of security contexts, managed by the userspace AVC. avc_context_to_sid() returns a SID for the given context in the memory referenced by sid. avc_sid_to_context() returns a copy of the context represented by sid in the memory referenced by ctx. The user must free the copy with freecon(3). avc_get_initial_sid() returns a SID for the kernel initial security identifier specified by name.

RETURN VALUEavc_context_to_sid() and avc_sid_to_context() return zero on success. On error, −1 is returned and errno is set appropriately.

ERRORSENOMEM  An attempt to allocate memory failed.

NOTESAs of libselinux version 2.0.86, SID's are no longer reference counted. A SID will be valid from the time it is first obtained until the next call to avc_destroy(3). The sidget(3) and sidput(3) functions, formerly used to adjust the reference count, are no-ops and are deprecated.

AUTHOREamon Walsh <ewalsh@tycho.nsa.gov>

SEE ALSOavc_init(3), avc_has_perm(3), avc_cache_stats(3), avc_add_callback(3), getcon(3), freecon(3), selinux(8)
0
Johanes Gumabo
Data Size   :   7,135 byte
man-avc_context_to_sid.3Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 202,401
Visitor ID   :     :  
Visitor IP   :   18.191.171.43   :  
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.