pub struct SeccompState {
pub mode: SeccompMode,
pub filters: Vec<SeccompFilter>,
}Expand description
Per-process seccomp state.
Fields§
§mode: SeccompModeCurrent mode.
filters: Vec<SeccompFilter>Stack of filters (all evaluated, most restrictive wins).
Implementations§
Source§impl SeccompState
impl SeccompState
pub fn new() -> Self
Sourcepub fn install_filter(
&mut self,
filter: SeccompFilter,
) -> Result<(), KernelError>
pub fn install_filter( &mut self, filter: SeccompFilter, ) -> Result<(), KernelError>
Install a new filter. Mode transitions to Filter.
Sourcepub fn evaluate(&self, data: &SeccompData) -> u32
pub fn evaluate(&self, data: &SeccompData) -> u32
Evaluate all filters against the given syscall data. Returns the most restrictive action (lowest value wins per Linux semantics).
Sourcepub fn fork_inherit(&self) -> Self
pub fn fork_inherit(&self) -> Self
Create a copy for a forked process (inherits filters marked for inheritance).
pub fn filter_count(&self) -> usize
Trait Implementations§
Source§impl Clone for SeccompState
impl Clone for SeccompState
Source§fn clone(&self) -> SeccompState
fn clone(&self) -> SeccompState
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SeccompState
impl Debug for SeccompState
Auto Trait Implementations§
impl Freeze for SeccompState
impl RefUnwindSafe for SeccompState
impl Send for SeccompState
impl Sync for SeccompState
impl Unpin for SeccompState
impl UnwindSafe for SeccompState
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)