pub enum LandlockStatus {
NotEnabled,
NotImplemented,
Available {
effective_abi: ABI,
kernel_abi: Option<i32>,
},
}Expand description
Status of Landlock support for the running system.
This enum is used to represent the status of the Landlock support for the system where the code is executed. It can indicate whether Landlock is available or not.
§Warning
Sandboxed programs should only use this data to log or provide information to users,
not to change their behavior according to this status. Indeed, the Ruleset and the other
types are designed to handle the compatibility in a simple and safe way.
Variants§
NotEnabled
Landlock is supported but not enabled (EOPNOTSUPP).
NotImplemented
Landlock is not implemented (i.e. not built into the running kernel: ENOSYS).
Available
Landlock is available and working on the running system.
This indicates that the kernel supports Landlock and it’s properly enabled.
The crate uses the effective_abi for all operations, which represents
the highest ABI version that both the kernel and this crate understand.
Fields
effective_abi: ABIThe effective ABI version that this crate will use for Landlock operations. This is the intersection of what the kernel supports and what this crate knows about.
kernel_abi: Option<i32>The actual kernel ABI version when it’s newer than any ABI supported by this crate.
If Some(version), it means the running kernel supports Landlock ABI version
which is higher than the latest ABI known by this crate.
This field is purely informational and is never used for Landlock operations.
The crate always and only uses effective_abi for all functionality.
Trait Implementations§
Source§impl Clone for LandlockStatus
impl Clone for LandlockStatus
Source§fn clone(&self) -> LandlockStatus
fn clone(&self) -> LandlockStatus
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more