pub struct Sandbox { /* private fields */ }Expand description
Linux backend wrapping Landlock + seccomp-bpf.
Implementations§
Source§impl LinuxSandbox
impl LinuxSandbox
Sourcepub fn new() -> Result<Self, CoreError>
pub fn new() -> Result<Self, CoreError>
Probe the kernel and construct the backend. Returns
CoreError::BackendUnavailable on kernels older than 5.13.
Sourcepub fn new_with_options(options: BackendOptions) -> Result<Self, CoreError>
pub fn new_with_options(options: BackendOptions) -> Result<Self, CoreError>
Constructor with capability-specific runtime options.
Trait Implementations§
Source§impl Debug for LinuxSandbox
impl Debug for LinuxSandbox
Source§impl SandboxBackend for LinuxSandbox
impl SandboxBackend for LinuxSandbox
Source§fn name(&self) -> &'static str
fn name(&self) -> &'static str
Human-readable backend identifier, e.g.
"sandbox-exec" or
"landlock+seccomp". Surfaced in sbe inspect output and audit logs.Source§fn info(&self) -> &BackendInfo
fn info(&self) -> &BackendInfo
What this backend can enforce on the current kernel/host. Populated
during construction (
Self::new performs the kernel probe); this
accessor is infallible.Source§fn render_policy(
&self,
profile: &SandboxProfile,
proxy_port: Option<u16>,
) -> Result<String, CoreError>
fn render_policy( &self, profile: &SandboxProfile, proxy_port: Option<u16>, ) -> Result<String, CoreError>
Render the resolved policy for
--dry-run and sbe inspect. Output
must be deterministic and platform-stable so tests can assert on
substrings. Read moreAuto Trait Implementations§
impl Freeze for LinuxSandbox
impl RefUnwindSafe for LinuxSandbox
impl Send for LinuxSandbox
impl Sync for LinuxSandbox
impl Unpin for LinuxSandbox
impl UnsafeUnpin for LinuxSandbox
impl UnwindSafe for LinuxSandbox
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