pub trait RestrictSelfAttr: Sized + RestrictSelfFlagsState {
// Provided method
fn log_subdomains(self, set: bool) -> Result<Self, RulesetError> { ... }
}Expand description
Trait for types that accept restrict_self flag configuration.
Provides log_subdomains() which works both
with and without a Landlock domain.
Implemented by RulesetCreated (via
RulesetCreatedAttr supertrait) and
RestrictSelf.
Domain-specific setters (log_same_exec, log_new_exec) are on
RulesetCreatedAttr.
Provided Methods§
Sourcefn log_subdomains(self, set: bool) -> Result<Self, RulesetError>
fn log_subdomains(self, set: bool) -> Result<Self, RulesetError>
Controls logging of denied accesses from nested Landlock domains. Logging is enabled by default. See the kernel documentation.
Calling with false sets the LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF flag.
Setters are last-call-wins: calling again with a different boolean
re-configures the flag (e.g., log_subdomains(false).log_subdomains(true)
leaves logging enabled).
Setting to the default value never triggers a compatibility check,
so it cannot error even under
CompatLevel::HardRequirement
on an unsupported kernel.
Available since Landlock ABI v7.
On error, returns a wrapped
SyscallFlagError<RestrictSelfFlag>.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.