restrict 0.2.1

A crate to allow, deny, or trace Linux syscalls with an ergonomic, auto-generated enum customized for your system architecture.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::{error::SeccompError, wrapper::SeccompWrapper};

/// seccomp filters
pub mod seccomp;
/// tracer filter(ptrace)
pub mod tracer;

/// Interceptor that allows you to modify registers in entry and exit
pub mod intercept;
/// define a Restrict filter trait
pub(crate) trait RestrictFilter {
    /// this method defines the behavior of applying a filter on the context(eg, seccomp context)
    fn apply(&self, ctx: &mut SeccompWrapper) -> Result<(), SeccompError>;
}