INNER CODE UNIT · Rust

apply

ouch-org/ouch · src/sandbox/mod.rs:69

    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)
        }
        // The sandbox is Linux only so elsewhere there is nothing to enforce
        #[cfg(not(target_os = "linux"))]
        {
            false
        }
    }
}

/// Resolve `path` to an absolute path, falling back to its parent if the

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…