INNER CODE UNIT · Rust
remove_in_paths
ouch-org/ouch · src/sandbox/mod.rs:59
pub fn remove_in_paths(&self) -> &[PathBuf] {
&self.remove_in
}
pub fn remove_dir_in_paths(&self) -> &[PathBuf] {
&self.remove_dir_in
}
/// Apply the policy and return whether the sandbox is now enforced.
/// Failures emit a warning and let the process run unrestricted.
pub fn apply(&self) -> bool {
if disabled_by_request(self.disabled) {
return false;
}
// On Linux the backend warns instead of failing when Landlock is missing and keeps going
#[cfg(target_os = "linux")]
{
landlock::apply(self)