Enum selinux::CommonFilePermission
source · pub enum CommonFilePermission {
Create,
GetAttr,
Link,
Open,
SetAttr,
Unlink,
}
Expand description
Permissions common to all file-like object classes (e.g. “lnk_file”, “dir”). These are
combined with a specific FileClass
by policy enforcement hooks, to obtain class-affine
permission values to check.
Variants§
Create
Permission to create a file.
GetAttr
Permission to query attributes, including uid, gid and extended attributes.
Link
Permissions to create hard link.
Open
Permission to open a file.
SetAttr
Permission to modify attributes, including uid, gid and extended attributes.
Unlink
Permission to delete a file or remove a hard link.
Implementations§
source§impl CommonFilePermission
impl CommonFilePermission
pub fn all_variants() -> Vec<Self>
source§impl CommonFilePermission
impl CommonFilePermission
sourcepub fn for_class(&self, class: FileClass) -> Permission
pub fn for_class(&self, class: FileClass) -> Permission
Returns the class
-affine Permission
value corresponding to this common permission.
This is used to allow hooks to resolve e.g. common “read” permission access based on the
“allow” rules for the correct target object class.
Trait Implementations§
source§impl Clone for CommonFilePermission
impl Clone for CommonFilePermission
source§fn clone(&self) -> CommonFilePermission
fn clone(&self) -> CommonFilePermission
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CommonFilePermission
impl Debug for CommonFilePermission
source§impl Hash for CommonFilePermission
impl Hash for CommonFilePermission
source§impl PartialEq for CommonFilePermission
impl PartialEq for CommonFilePermission
source§fn eq(&self, other: &CommonFilePermission) -> bool
fn eq(&self, other: &CommonFilePermission) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for CommonFilePermission
impl StructuralPartialEq for CommonFilePermission
Auto Trait Implementations§
impl Freeze for CommonFilePermission
impl RefUnwindSafe for CommonFilePermission
impl Send for CommonFilePermission
impl Sync for CommonFilePermission
impl Unpin for CommonFilePermission
impl UnwindSafe for CommonFilePermission
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)