Skip to main content

Module check

Module check 

Source
Expand description

System capability checking.

Verifies at runtime that the kernel supports all required features for sandboxing. The check is performed once and cached in a static OnceLock.

§Required Features

FeatureMinimumCheck Method
Kernel6.12uname syscall
LandlockABI 5landlock_create_ruleset with VERSION flag
Seccompenabledprctl(PR_GET_SECCOMP)

§Usage

match check::check() {
    Ok(info) => println!("Landlock ABI: {}", info.landlock_abi),
    Err(e) => eprintln!("System not supported: {}", e),
}

Structs§

SystemInfo
Information about the system’s sandboxing capabilities.

Enums§

CheckError
Errors that can occur during system capability checking.

Functions§

check
Check system capabilities and cache the result.