Skip to main content

Crate sandbox_jail

Crate sandbox_jail 

Source
Expand description

Run a command in a sandbox under a policy the caller defines: Seatbelt on macOS, bubblewrap on Linux, or a throwaway tart or lume VM with vm::Vm. The crate only enforces the policy

Modules§

known
Lists a caller can opt into. Nothing here applies unless the caller puts it in its policy
vm
Run commands in a throwaway VM: a clone of the image, booted headless with the policy’s dirs shared at their host paths, and deleted when the handle drops

Structs§

Overlay
An overlay mounted on lower, which stays unchanged while writes go to upper. bwrap only
Policy
What the command may touch. Every path must be absolute
Sandbox
A policy checked against a backend, ready to wrap commands

Enums§

Access
Everything, or only the listed items
Backend
Error

Functions§

overlay_supported
Whether bwrap can mount an overlay with its layers in dir, and why not. It needs bwrap 0.10 or later and a kernel that mounts overlayfs in a user namespace