pub enum CommonFsNodePermission {
Append,
Create,
GetAttr,
Ioctl,
Lock,
Map,
Read,
RelabelFrom,
RelabelTo,
SetAttr,
Write,
}
Expand description
Permissions meaningful for all [crate::vfs::FsNode
]s, whether file- or socket-like.
This extra layer of common permissions is not reflected in the hierarchy defined by the SELinux Reference Policy. Because even common permissions are mapped per-class, by name, to the policy equivalents, the implementation and policy notions of common permissions need not be identical.
Variants§
Append
Permission to append to a file or socket.
Create
Permission to create a file or socket.
GetAttr
Permission to query attributes, including uid, gid and extended attributes.
Ioctl
Permission to execute ioctls on the file or socket.
Lock
Permission to set and unset file or socket locks.
Map
Permission to map a file.
Read
Permission to read content from a file or socket, as well as reading or following links.
RelabelFrom
Permission checked against the existing label when updating a node’s security label.
RelabelTo
Permission checked against the new label when updating a node’s security label.
SetAttr
Permission to modify attributes, including uid, gid and extended attributes.
Write
Permission to write contents to the file or socket.
Implementations§
Source§impl CommonFsNodePermission
impl CommonFsNodePermission
pub fn all_variants() -> Vec<Self>
Source§impl CommonFsNodePermission
impl CommonFsNodePermission
Sourcepub fn for_class(&self, class: impl Into<FsNodeClass>) -> KernelPermission
pub fn for_class(&self, class: impl Into<FsNodeClass>) -> KernelPermission
Returns the class
-affine KernelPermission
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 CommonFsNodePermission
impl Clone for CommonFsNodePermission
Source§fn clone(&self) -> CommonFsNodePermission
fn clone(&self) -> CommonFsNodePermission
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CommonFsNodePermission
impl Debug for CommonFsNodePermission
Source§impl Hash for CommonFsNodePermission
impl Hash for CommonFsNodePermission
Source§impl PartialEq for CommonFsNodePermission
impl PartialEq for CommonFsNodePermission
impl Eq for CommonFsNodePermission
impl StructuralPartialEq for CommonFsNodePermission
Auto Trait Implementations§
impl Freeze for CommonFsNodePermission
impl RefUnwindSafe for CommonFsNodePermission
impl Send for CommonFsNodePermission
impl Sync for CommonFsNodePermission
impl Unpin for CommonFsNodePermission
impl UnwindSafe for CommonFsNodePermission
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§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more