pub struct LandlockConfig {
pub read_paths: Vec<PathBuf>,
pub write_paths: Vec<PathBuf>,
pub exec_paths: Vec<PathBuf>,
}Expand description
Landlock filesystem access configuration
Fields§
§read_paths: Vec<PathBuf>Paths with read access
write_paths: Vec<PathBuf>Paths with write access
exec_paths: Vec<PathBuf>Paths with execute access
Implementations§
Source§impl LandlockConfig
impl LandlockConfig
Sourcepub fn is_available() -> bool
pub fn is_available() -> bool
Check if landlock is available on this system
Sourcepub fn apply(&self) -> Result<(), SandboxError>
pub fn apply(&self) -> Result<(), SandboxError>
Apply landlock restrictions to the current process. WARNING: This is irreversible for the current process.
Trait Implementations§
Source§impl Clone for LandlockConfig
impl Clone for LandlockConfig
Source§fn clone(&self) -> LandlockConfig
fn clone(&self) -> LandlockConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LandlockConfig
impl Debug for LandlockConfig
Source§impl Default for LandlockConfig
impl Default for LandlockConfig
Source§fn default() -> LandlockConfig
fn default() -> LandlockConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LandlockConfig
impl RefUnwindSafe for LandlockConfig
impl Send for LandlockConfig
impl Sync for LandlockConfig
impl Unpin for LandlockConfig
impl UnsafeUnpin for LandlockConfig
impl UnwindSafe for LandlockConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more