pub struct LocalProcessBackend { /* private fields */ }Expand description
Landlock / Seatbelt enforce backend.
Implementations§
Source§impl LocalProcessBackend
impl LocalProcessBackend
pub fn new() -> Self
pub fn with_options(opts: LocalProcessOptions) -> Self
pub fn process_has_kernel_sandbox() -> bool
pub fn is_applied(&self) -> bool
pub fn restricts_child_network(&self) -> bool
pub fn options(&self) -> &LocalProcessOptions
Trait Implementations§
Source§impl Default for LocalProcessBackend
impl Default for LocalProcessBackend
Source§impl EnforceBackend for LocalProcessBackend
impl EnforceBackend for LocalProcessBackend
fn info(&self) -> BackendInfo
Source§fn apply<'life0, 'life1, 'async_trait>(
&'life0 self,
policy: &'life1 Policy,
sink: Arc<dyn RecordSink>,
) -> Pin<Box<dyn Future<Output = EnforceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn apply<'life0, 'life1, 'async_trait>(
&'life0 self,
policy: &'life1 Policy,
sink: Arc<dyn RecordSink>,
) -> Pin<Box<dyn Future<Output = EnforceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Apply policy for this space. May be irreversible for kernel backends.
Source§fn check_fs<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
policy: &'life1 Policy,
path: &'life2 Path,
write: bool,
) -> Pin<Box<dyn Future<Output = EnforceResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn check_fs<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
policy: &'life1 Policy,
path: &'life2 Path,
write: bool,
) -> Pin<Box<dyn Future<Output = EnforceResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Check whether a path operation would be allowed (best-effort soft check).
Source§fn spawn<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
space_id: &'life1 SpaceId,
policy: &'life2 Policy,
req: SpawnRequest,
sink: Arc<dyn RecordSink>,
) -> Pin<Box<dyn Future<Output = EnforceResult<SpawnedProcess>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn spawn<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
space_id: &'life1 SpaceId,
policy: &'life2 Policy,
req: SpawnRequest,
sink: Arc<dyn RecordSink>,
) -> Pin<Box<dyn Future<Output = EnforceResult<SpawnedProcess>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Spawn a subprocess under the policy (soft or hard depending on backend).
Source§fn destroy<'life0, 'life1, 'async_trait>(
&'life0 self,
_policy: &'life1 Policy,
_sink: Arc<dyn RecordSink>,
) -> Pin<Box<dyn Future<Output = EnforceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn destroy<'life0, 'life1, 'async_trait>(
&'life0 self,
_policy: &'life1 Policy,
_sink: Arc<dyn RecordSink>,
) -> Pin<Box<dyn Future<Output = EnforceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Tear down enforcement for this space (revoke, unmount, etc.).
Auto Trait Implementations§
impl !Freeze for LocalProcessBackend
impl !RefUnwindSafe for LocalProcessBackend
impl Send for LocalProcessBackend
impl Sync for LocalProcessBackend
impl Unpin for LocalProcessBackend
impl UnsafeUnpin for LocalProcessBackend
impl UnwindSafe for LocalProcessBackend
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