context_new - Online Linux Manual PageSection : 3
Updated : 20 December 2011
Source : dwalsh@redhat.com
Note : SELinux API documentation

NAMEcontext_new, context_str, context_free, context_type_get, context_type_set, context_range_get, context_range_set,context_role_get, context_role_set, context_user_get, context_user_set − Routines to manipulate SELinux security contexts

SYNOPSIS#include <selinux/context.h> context_t context_new(const char *context_str); const char * context_str(context_t con); void context_free(context_t con); const char * context_type_get(context_t con); const char * context_range_get(context_t con); const char * context_role_get(context_t con); const char * context_user_get(context_t con); int context_type_set(context_t con, const char *type); int context_range_set(context_t con, const char *range); int context_role_set(context_t con, const char *role); int context_user_set(context_t con, const char *user);

DESCRIPTIONThese functions allow an application to manipulate the fields of a security context string without requiring it to know the format of the string. context_new() returns a new context initialized to a context string. context_str() returns a pointer to the string value of the context_t, valid until the next call to context_str() or context_free() for the same context_t*. context_free() frees the storage used by a context. context_type_get(), context_range_get(), context_role_get(), ­context_user_get() get a pointer to the string value of a context component. Note: Values returned by the get functions are only valid until the next call to a set function or context_free() for the same context_t structure. context_type_set(), context_range_set(), context_role_set(), ­context_user_set() set a context component.

RETURN VALUEOn failure context_*_set() functions return non-zero and 0 on success. The other functions return NULL on failure and non-NULL on success. On failure errno is set appropriately.

SEE ALSOselinux(8)"
0
Johanes Gumabo
Data Size   :   7,609 byte
man-context_str.3Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 199,336
Visitor ID   :     :  
Visitor IP   :   18.223.241.235   :  
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.