Skip to main content

fit

Function fit 

Source
pub fn fit(profile: &Profile) -> Result<(Profile, Option<String>), String>
Expand description

The profile procage enforces here, with a notice for what it leaves out.

Where the host cannot enforce part of a speccoder profile, procage’s Cage::fit gives up exactly that part, and only these:

  • read-only or hidden trees inside a writable one (in place: .git and git-ignored secrets) and the trust-handoff names in writable trees (git hooks, shell startup files): Landlock cannot deny inside a tree it allows, without user namespaces;
  • Unix sockets in the writable trees: without user namespaces other sockets cannot be kept out, so none is reachable;
  • signals within the run: Linux older than 6.12 cannot keep them there.

The fitted profile records each of these, so the helper, which rebuilds the cage from it, confines exactly the same way.

§Errors

Any other refusal: procage cannot confine this profile here.