Expand description
What the host programs a capsule’s tools run need from the host, as each tool’s own
murmur.yaml declares it (murmur_artifact::parse_program_needs), resolved against this
host at staging.
A tool declares needs per program, by soname, by file name beside a declared library, relative
to the program’s own folder, by a named system location, or by a name under /etc, and never
by host path. A need reaches a session only when the capsule makes both declarations: its
artifacts: pins the tool with an operator lock origin (or there is no lock), and its
capabilities.shell.allow names the program verbatim. A runtime pin and an artifact added
mid-session contribute nothing: the enforcement is resolved once, at launch.
| Form | Resolves to | Grant |
|---|---|---|
library: S | S as the loader resolves it for each binary the program resolves to on PATH, then that library’s DT_NEEDED closure | each file read |
file: F, beside: S | F in the folder S resolved to, a regular file | read |
program_folder: R | R under the folder of each binary the program resolves to | read, and list for a folder |
system: fonts | each existing FONT_LOCATIONS entry | read and list |
system: ca_bundle | the trust-store locations [crate::trust_store] checks, with no network gate | as the trust store |
etc: N | /etc/N | read, and list for a folder |
Every path is canonical, and no grant is executable ([crate::sandbox::resolve_declared_need_grants]).
A resolved path that is /, or is, lies beneath or holds /proc, /sys, /dev, the home
folder, a tree the capsule’s commands can write or an /etc credential location
(murmur_artifact::ETC_CREDENTIAL_LOCATIONS) is reported missing instead. A missing need
never refuses a launch.
The grants join the session’s one command scope, as the DT_NEEDED closure of a granted
program does: every command of the session, and every program a WASM tool runs, can read them.
“For this program” is the gate and the attribution, not a per-executable rule.
Off Linux nothing is derived: commands’ file reads are not path-scoped there.
Structs§
- Declared
Tool Needs - One staged tool’s
programs:block, with the lock origin of its pin. - Missing
Need - A need, or part of one, that is not granted, and why.
- Resolved
Need - A need and the host paths it is granted.
- Resolved
Program Needs - What one artifact’s needs for one program resolved to on this host.
Constants§
- FONT_
LOCATIONS - The host locations
system: fontsresolves to, each one this host has. - NOT_
FOUND - The
missingreason of a need that resolves to nothing on this host. - PROGRAM_
NOT_ ON_ PATH - The
missingreason of a need relative to a programPATHresolves to no binary for.
Functions§
- derive_
declared_ needs - The needs
toolsdeclare for the programsshell_allowgrants, resolved against this host. - distributions_
from_ os_ release host_distributionsfrom os-release text:ID, then each whitespace-separated word ofID_LIKE, unquoted, each once.- host_
distributions - This host’s distribution IDs, most specific first: os-release’s
ID, then each word of itsID_LIKE, read from/etc/os-release, else/usr/lib/os-release. Empty when neither reads. - package_
for - The package
needdeclares for the first ofdistributionsit names one for, with that distribution.
Type Aliases§
- Need
Path - One granted path: canonical, listable when a directory. The trust store’s path type, since a
system: ca_bundleneed resolves to exactly the trust store’s paths.