security_context_to_sid2
Get a sid for a security context string
Usage
#include <ss.h>
int security_context_to_sid(const security_context_t scontext, __u32 scontext_len, security_id_t *out_sid);
Overview
The security_context_to_sid call is used to obtain a SID associated with the security context that has the string representation specified by scontext. The scontext_len parameter specifies the length of the string, including the terminating NULL character.
Return value
A zero is returned on success. On error, -1 is returned, and errno is set appropriately.
Errors
EINVAL
|
The context was invalid. |
|---|---|
EACCES
|
The process is not authorized to invoke this call. |