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()
.