pub enum CommonFilePermission {
Show 15 variants
Append,
Create,
Execute,
GetAttr,
Ioctl,
Link,
MountOn,
Open,
Read,
RelabelFrom,
RelabelTo,
Rename,
SetAttr,
Unlink,
Write,
}
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§
Append
Permission to append to a file.
Create
Permission to create a file.
Execute
Permission to execute a file with domain transition.
GetAttr
Permission to query attributes, including uid, gid and extended attributes.
Ioctl
Permission to execute ioctls on the file.
Link
Permissions to create hard link.
MountOn
Permission to use as mount point; only useful for directories and files.
Open
Permission to open a file.
Read
Permission to read file contents. Note this applies to reading more than regular file’s data.
RelabelFrom
Permission checked against the existing label when updating a file’s security label.
RelabelTo
Permission checked against the new label when updating a file’s security label.
Rename
Permission to rename a file.
SetAttr
Permission to modify attributes, including uid, gid and extended attributes.
Unlink
Permission to delete a file or remove a hard link.
Write
Permission to write or append file contents.
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
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)