Struct selinux::OpaqueSecurityContext
source · pub struct OpaqueSecurityContext { /* private fields */ }Expand description
Opaque security context.
Implementations§
source§impl OpaqueSecurityContext
impl OpaqueSecurityContext
sourcepub fn as_ptr(&self) -> *const context_s_t
pub fn as_ptr(&self) -> *const context_s_t
Return the managed raw pointer to selinux_sys::context_s_t.
sourcepub fn as_mut_ptr(&mut self) -> *mut context_s_t
pub fn as_mut_ptr(&mut self) -> *mut context_s_t
Return the managed raw pointer to selinux_sys::context_s_t.
sourcepub fn new(context: &str) -> Result<Self>
pub fn new(context: &str) -> Result<Self>
Return a new context initialized to a context string.
See: context_new().
sourcepub fn from_c_str(context: &CStr) -> Result<Self>
pub fn from_c_str(context: &CStr) -> Result<Self>
Return a new context initialized to a context string.
See: context_new().
sourcepub fn to_c_string(&self) -> Result<CString>
pub fn to_c_string(&self) -> Result<CString>
Return the string value of this security context.
See: context_str().
sourcepub fn the_type(&self) -> Result<CString>
pub fn the_type(&self) -> Result<CString>
Return the string value of this security context’s type.
See: context_type_get().
sourcepub fn set_type_str(&self, new_value: &str) -> Result<()>
pub fn set_type_str(&self, new_value: &str) -> Result<()>
Set the type of this security context.
See: context_type_set().
sourcepub fn set_type(&self, new_value: &CStr) -> Result<()>
pub fn set_type(&self, new_value: &CStr) -> Result<()>
Set the type of this security context.
See: context_type_set().
sourcepub fn range(&self) -> Result<CString>
pub fn range(&self) -> Result<CString>
Return the string value of this security context’s range.
See: context_range_get().
sourcepub fn set_range_str(&self, new_value: &str) -> Result<()>
pub fn set_range_str(&self, new_value: &str) -> Result<()>
Set the range of this security context.
See: context_range_set().
sourcepub fn set_range(&self, new_value: &CStr) -> Result<()>
pub fn set_range(&self, new_value: &CStr) -> Result<()>
Set the range of this security context.
See: context_range_set().
sourcepub fn role(&self) -> Result<CString>
pub fn role(&self) -> Result<CString>
Return the string value of this security context’s role.
See: context_role_get().
sourcepub fn set_role_str(&self, new_value: &str) -> Result<()>
pub fn set_role_str(&self, new_value: &str) -> Result<()>
Set the role of this security context.
See: context_role_set().
sourcepub fn set_role(&self, new_value: &CStr) -> Result<()>
pub fn set_role(&self, new_value: &CStr) -> Result<()>
Set the role of this security context.
See: context_role_set().
sourcepub fn user(&self) -> Result<CString>
pub fn user(&self) -> Result<CString>
Return the string value of this security context’s user.
See: context_user_get().
sourcepub fn set_user_str(&self, new_value: &str) -> Result<()>
pub fn set_user_str(&self, new_value: &str) -> Result<()>
Set the user of this security context.
See: context_user_set().