pub struct NamespaceJail;Expand description
The namespace, Landlock, and seccomp jail.
Trait Implementations§
Source§impl JailBackend for NamespaceJail
impl JailBackend for NamespaceJail
Source§fn probe(&self, runner: &Runner) -> Result<(), RunnerError>
fn probe(&self, runner: &Runner) -> Result<(), RunnerError>
Two stages. The first runs the network probe with the syscall filter off, so the namespace layer’s denial is observed directly. The second proves the filter layer by attempting one socket creation under it and requiring the kernel to kill the process.
Source§fn command(&self, spec: &SpawnSpec<'_>) -> Result<Command, RunnerError>
fn command(&self, spec: &SpawnSpec<'_>) -> Result<Command, RunnerError>
Builds the jailed command for one invocation. The runner still
applies the portable contract on top: cleared environment,
working directory inside the jail, piped stdio, and a fresh
process group.
Source§fn policy_material(&self) -> String
fn policy_material(&self) -> String
A stable description of the enforced policy. It feeds the
probe cache digest, so any policy change invalidates every
cached probe pass.
Auto Trait Implementations§
impl Freeze for NamespaceJail
impl RefUnwindSafe for NamespaceJail
impl Send for NamespaceJail
impl Sync for NamespaceJail
impl Unpin for NamespaceJail
impl UnsafeUnpin for NamespaceJail
impl UnwindSafe for NamespaceJail
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more