Skip to main content

ProgramResolver

Trait ProgramResolver 

Source
pub trait ProgramResolver {
    // Required method
    fn resolve(&self, program: &str) -> Option<String>;

    // Provided methods
    fn pinned(&self, _program: &str) -> Option<String> { ... }
    fn own_binaries(&self) -> Vec<String> { ... }
}
Expand description

Resolves program names using a search path the kernel controls.

Required Methods§

Source

fn resolve(&self, program: &str) -> Option<String>

Absolute path program would run from, or None if it is not found.

Provided Methods§

Source

fn pinned(&self, _program: &str) -> Option<String>

Path recorded for program when the kernel was installed, if any.

Source

fn own_binaries(&self) -> Vec<String>

Where OpenMoat’s own binary and its alias are installed. A command whose program word reaches one of these files, through a link under another name or on the search path, is decided as openmoat too, so the rules that keep OpenMoat’s person-only commands from an agent see it. By default the pins of openmoat and moat.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§