Function sandbox_posture
pub fn sandbox_posture(
sandbox: &SandboxConfig,
runtime_kind: RuntimeKind,
workspace_dir: Option<&Path>,
extra_roots: &SandboxExtraRoots,
) -> SandboxPostureExpand description
Inspect sandbox backend selection without returning a usable sandbox.
This does not enforce anything, but on Linux it is not a minimal or
side-effect-free probe: landlock_available reaches
LandlockSandbox::with_roots, which builds the full ruleset execution will
use — opening every configured path and emitting the same DEBUG/WARN
diagnostics for absent, unopenable, or unenforceable roots. That is
deliberate. Deciding availability from a cheaper probe is what let posture
report a backend as active while every subsequent spawn failed; validating
through the real construction keeps the two answers in step.
The ruleset is dropped without restrict_self, so the calling process is
never confined.