pub struct Restriction {
pub name: Mechanism,
pub available: bool,
pub configured: bool,
pub applied: Option<bool>,
pub tested: Option<bool>,
}Expand description
One restriction of the run.
Fields§
§name: MechanismWhich.
available: boolThis system has it.
configured: boolThis run asks for it.
applied: Option<bool>The kernel or tool reported it in force; None before the agent
starts, or where nothing reports it.
tested: Option<bool>A check after the agent started confirmed it (/proc/<pid>/status);
None where no such check exists (Landlock’s rules cannot be read
back, Seatbelt has no /proc).
Implementations§
Source§impl Restriction
impl Restriction
Sourcepub fn planned(name: Mechanism, available: bool, configured: bool) -> Self
pub fn planned(name: Mechanism, available: bool, configured: bool) -> Self
A restriction as planned: not yet applied or tested.
Sourcepub fn missing(&self, launched: bool) -> bool
pub fn missing(&self, launched: bool) -> bool
Whether the run asked for it, the system has it, and the launch found
it not applied or not in force. Once the agent started (launched),
what the tier promises must be confirmed: unknown counts as missing
for the seccomp filters and no_new_privs (tested), and for
Landlock’s required rights and bubblewrap’s namespace and view
(applied). Best-effort steps and Seatbelt, which nothing reports,
are missing only when reported off. On Windows the token and the job
must be confirmed on the agent’s own process (tested).