Expand description
The /proc a capsule command sees: a private procfs of the session’s own PID namespace, or
the host’s.
Every command on a Linux kernel tier runs inside its session’s PID namespace
(crate::network_namespace creates it with the network namespace; each command’s relay
enters it in sandbox::linux_enforce). Where the host lets a process of that namespace mount
proc, the command mounts one over /proc in a private mount namespace, and on scoped and
sealed Landlock grants ReadFile | ReadDir beneath it — never Execute, never a write right.
| View | What a command reaches at /proc |
|---|---|
ProcView::Private | the session’s own processes and the kernel’s world-readable files (cpuinfo, meminfo, stat, /proc/sys, …); no host process |
ProcView::Host | the host’s /proc; on scoped and sealed every open beneath it is EACCES |
[proc_view] is the one decision, made from the session’s crate::sandbox::HostProbe: the
private view exactly when the probe’s private-procfs rehearsal mounted one
(crate::namespace_probe::NamespaceReading::private_proc). A session’s
[crate::sandbox::ShellEnforcement] carries the answer and its
crate::containment::ScopeReport says it, both from the same probe.
hidepid masks, within the private view, every process the command may not ptrace-read:
the namespace’s holder (pid 1, which holds capabilities the command does not) and, under
Landlock, a process of another command, whose domain is not the reader’s.
Structs§
- Process
View Report - The
/proca session’s commands see —--explain-scope’sProcess viewblock,session_start.effective_grants.process_viewandmur doctor’s section, all fromprocess_view_report. Field names are the JSON keys; every field is always serialized.
Enums§
- Host
Proc Reason - Why a session’s commands see the host’s
/proc. - Proc
Mount Step - One step of mounting the private
/procin a command’spre_execwindow. - Proc
View - Which
/proca session’s commands see.
Constants§
- PID_
NAMESPACE_ MECHANISM - The
mounted_bywire name of the private view. - PRIVATE_
PROC_ FAILURE_ PREFIX - What every failure to mount the private
/procat spawn starts with.
Functions§
- describe_
mount_ failure <prefix> <step> failed: <errno>, the spawn failure of a step. Allocates: called only on the failure path, as every other step’s message in thepre_execwindow is.- process_
view_ report - The report of
view. Pure. - render_
process_ view - The
Process viewblock of--explain-scopeandmur doctor. Ends with a newline.