pub struct ProcessGuardBackend {
pub soft_block_on_deny_all_net: bool,
}Fields§
§soft_block_on_deny_all_net: boolWhen true, refuse spawn if network is DenyAll (cannot hard-block; documents intent).
Implementations§
Source§impl ProcessGuardBackend
impl ProcessGuardBackend
pub fn new() -> ProcessGuardBackend
Trait Implementations§
Source§impl Default for ProcessGuardBackend
impl Default for ProcessGuardBackend
Source§fn default() -> ProcessGuardBackend
fn default() -> ProcessGuardBackend
Returns the “default value” for a type. Read more
Source§impl EnforceBackend for ProcessGuardBackend
impl EnforceBackend for ProcessGuardBackend
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 = Result<(), EnforceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
ProcessGuardBackend: 'async_trait,
fn apply<'life0, 'life1, 'async_trait>(
&'life0 self,
policy: &'life1 Policy,
_sink: Arc<dyn RecordSink>,
) -> Pin<Box<dyn Future<Output = Result<(), EnforceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
ProcessGuardBackend: '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 = Result<bool, EnforceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
ProcessGuardBackend: '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 = Result<bool, EnforceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
ProcessGuardBackend: '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 = Result<SpawnedProcess, EnforceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
ProcessGuardBackend: '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 = Result<SpawnedProcess, EnforceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
ProcessGuardBackend: '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 = Result<(), EnforceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
ProcessGuardBackend: 'async_trait,
fn destroy<'life0, 'life1, 'async_trait>(
&'life0 self,
_policy: &'life1 Policy,
_sink: Arc<dyn RecordSink>,
) -> Pin<Box<dyn Future<Output = Result<(), EnforceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
ProcessGuardBackend: 'async_trait,
Tear down enforcement for this space (revoke, unmount, etc.).
Auto Trait Implementations§
impl Freeze for ProcessGuardBackend
impl RefUnwindSafe for ProcessGuardBackend
impl Send for ProcessGuardBackend
impl Sync for ProcessGuardBackend
impl Unpin for ProcessGuardBackend
impl UnsafeUnpin for ProcessGuardBackend
impl UnwindSafe for ProcessGuardBackend
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