Re-exports§
pub use crate::fork::fork_process;
Modules§
- config 🔒
- Provides fork_process to fork a process.
- helpers 🔒
Structs§
- Config for the sandbox to be created by [Minijail].
- Wrapper that cleans up a [Minijail] when it is dropped
Enums§
- The user in the jail to run as.
Constants§
- Most devices don’t need to open many fds. However, an implementation detail of minijail is that after applying this limit, it opens an additional file descriptor to scan the /proc/self/fd directory to choose which file descriptors to close in the child process. The open files limit therefore has to be higher than the number file descriptors that the parent thread holds open before the jail is started.
- The max open files for jail warden, matching FD_RAW_FAILURE.
Functions§
- Creates a [Minijail] instance which just changes the root using pivot_root(2) path and
max_open_files
usingRLIMIT_NOFILE
. - Creates a [Minijail] instance which just invokes a jail process and sets
max_open_files
usingRLIMIT_NOFILE
. This is helpful with crosvm process runs as a non-root user without SYS_ADMIN capabilities. - Creates a default Minijail instance with no configuration.
- Creates [Minijail] for gpu processes.
- Creates a [Minijail] instance which creates a sandbox.
- Selectively bind mount drm nodes into
jail
based onrender_node_only
- Mirror-mount all the directories in
dirs
intojail
on a best-effort basis. - Mount proc in the sandbox.
- Set the seccomp policy for a jail from embedded bpfs
- Creates a basic [Minijail] if
jail_config
is present.