Function selinux_sys::avc_sid_to_context [−][src]
pub unsafe extern "C" fn avc_sid_to_context(
sid: security_id_t,
ctx: *mut *mut c_char
) -> c_int
avc_sid_to_context - get copy of context corresponding to SID. @sid: input SID @ctx: pointer to context reference
Return a copy of the security context corresponding to the input @sid in the memory referenced by @ctx. The caller is expected to free the context with freecon(). Return %0 on success, -%1 on failure, with @errno set to %ENOMEM if insufficient memory was available to make the copy, or %EINVAL if the input SID is invalid.