Expand description
PRoot reimplemented in Rust.
The program runs a command inside a guest root filesystem without any
privilege. Path-taking syscalls are routed through seccomp user
notification and answered by a small pool of supervisor threads; only the
syscalls that must change the traceeβs own state in place (execve,
chdir, unix socket bind/connect) take a ptrace stop. Everything else
runs untraced at native speed. Where ptrace is filtered out, those few
syscalls are served through notifications too, with in-place rewrites
(syscall::direct).
The binary behaves like bubblewrap when invoked through a name ending in
bwrap, busybox style, so a symlink is enough to make it a drop-in.
ModulesΒ§
- abi π
- Syscall ABIs a tracee may use.
- access π
- How the supervisor gets the right to reach its tracees.
- cli π
- PRoot command-line front end (the subset proot-apps and users rely on).
- config π
- Runtime configuration shared by both command-line front ends.
- exec π
execvehandling at the ptrace stop.- fs π
- Guest filesystem view: the root, the bindings, and path translation.
- guest_
stub π - The supervisorβs side of the guest-stub restricted mode.
- launch π
- Starting the first tracee and wiring supervisor, listener and tracer.
- procs π
- Per-process bookkeeping shared by every handler: the program a process
runs, the identity it believes it has under
-0and, without ptrace, the working directory it believes it is in. - seccomp π
- Seccomp: the BPF filter the tracee installs, and the listener pool that answers user notifications.
- state π
- Supervisor-wide shared state.
- sys π
- Raw kernel ABI not covered (or not covered stably) by the
libccrate: the seccomp user-notification structures and ioctls, plus small helpers. - syscall π
- Syscall routing: which numbers go where, and the handlers for each tier.
- tracee π
- Access to a tracee: its memory and, at ptrace stops, its registers.
- tracer π
- The ptrace event loop. Runs on the thread that forked the first tracee.
MacrosΒ§
- note
- Logs to stderr when
verboseis at leastlevel.
FunctionsΒ§
- main π
- Program entry point.