#[non_exhaustive]pub enum RestrictSelfFlag {
LogSameExec,
LogNewExec,
LogSubdomains,
AllThreads,
}Expand description
Identifies a configuration flag for the landlock_restrict_self() syscall.
Unlike access rights (AccessFs, AccessNet)
and scopes (Scope), these flags are not passed to
landlock_create_ruleset() but to landlock_restrict_self(). They control
audit logging behavior and thread synchronization rather than access
restrictions.
Each flag is set through a dedicated boolean method on
RulesetCreatedAttr or
RestrictSelfAttr. The polarity mapping
(e.g., log_same_exec(false) maps to LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF)
is handled internally.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
LogSameExec
Same-exec logging (see RulesetCreatedAttr::log_same_exec()).
LogNewExec
New-exec logging (see RulesetCreatedAttr::log_new_exec()).
LogSubdomains
Subdomain logging (see RestrictSelfAttr::log_subdomains()).
AllThreads
Apply the restriction to all threads of the process (see
RestrictSelfAttr::all_threads()).
Trait Implementations§
Source§impl Clone for RestrictSelfFlag
impl Clone for RestrictSelfFlag
Source§fn clone(&self) -> RestrictSelfFlag
fn clone(&self) -> RestrictSelfFlag
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RestrictSelfFlag
impl Debug for RestrictSelfFlag
Source§impl PartialEq for RestrictSelfFlag
impl PartialEq for RestrictSelfFlag
Source§fn eq(&self, other: &RestrictSelfFlag) -> bool
fn eq(&self, other: &RestrictSelfFlag) -> bool
self and other values to be equal, and is used by ==.