pub struct SeccompFilterContainer {
pub filters: Vec<Arc<SeccompFilter>>,
pub provided_instructions: u16,
}Expand description
A list of seccomp filters, intended to be associated with a specific process.
Fields§
§filters: Vec<Arc<SeccompFilter>>List of currently installed seccomp_filters; most recently added is last.
provided_instructions: u16Implementations§
Source§impl SeccompFilterContainer
impl SeccompFilterContainer
Sourcepub fn can_sync_to(&self, source: &SeccompFilterContainer) -> bool
pub fn can_sync_to(&self, source: &SeccompFilterContainer) -> bool
Ensures that this set of seccomp filters can be “synced to” the given set. This means that our filters are a prefix of the given set of filters.
Sourcepub fn add_filter(
&mut self,
filter: Arc<SeccompFilter>,
original_length: u16,
) -> Result<(), Errno>
pub fn add_filter( &mut self, filter: Arc<SeccompFilter>, original_length: u16, ) -> Result<(), Errno>
Adds the given filter to this list. The original_length parameter is the length of the originally provided BPF (i.e., the number of sock_filter instructions), used to ensure the total length does not exceed SECCOMP_MAX_INSNS_PER_PATH
Sourcepub fn run_all(
&self,
current_task: &CurrentTask,
syscall: &Syscall,
) -> SeccompFilterResult
pub fn run_all( &self, current_task: &CurrentTask, syscall: &Syscall, ) -> SeccompFilterResult
Runs all of the seccomp filters in this container, most-to-least recent. Returns the highest priority result (which contains a reference to the filter that generated it)
pub fn create_notifier() -> SeccompNotifierHandle
pub fn register_listener( current_task: &CurrentTask, notifier: SeccompNotifierHandle, ) -> Result<FdNumber, Errno>
Trait Implementations§
Source§impl Clone for SeccompFilterContainer
impl Clone for SeccompFilterContainer
Source§impl Default for SeccompFilterContainer
impl Default for SeccompFilterContainer
Source§fn default() -> SeccompFilterContainer
fn default() -> SeccompFilterContainer
Returns the “default value” for a type. Read more
Source§impl Drop for SeccompFilterContainer
impl Drop for SeccompFilterContainer
Auto Trait Implementations§
impl !RefUnwindSafe for SeccompFilterContainer
impl !UnwindSafe for SeccompFilterContainer
impl Freeze for SeccompFilterContainer
impl Send for SeccompFilterContainer
impl Sync for SeccompFilterContainer
impl Unpin for SeccompFilterContainer
impl UnsafeUnpin for SeccompFilterContainer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
fn fidl_into_native(self) -> Box<N>
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more