#[non_exhaustive]
pub enum ScmpFilterAttr {
    ActDefault,
    ActBadArch,
    CtlNnp,
    CtlTsync,
    ApiTskip,
    CtlLog,
    CtlSsb,
    CtlOptimize,
    ApiSysRawRc,
}
Expand description

Represents filter attributes.

You can set/get the attributes of a filter context with ScmpFilterContext::set_filter_attr and ScmpFilterContext::get_filter_attr methods.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.

ActDefault

The default filter action as specified in the call to seccomp reset.

ActBadArch

The filter action taken when the loaded filter does not match the architecture of the executing application.

CtlNnp

A flag to specify if the NO_NEW_PRIVS functionality should be enabled before loading the seccomp filter into the kernel.

CtlTsync

A flag to specify if the kernel should attempt to synchronize the filters across all threads on seccomp load.

ApiTskip

A flag to specify if the libseccomp should allow filter rules to be created for the -1 syscall.

CtlLog

A flag to specify if the kernel should log all filter actions taken except for the ScmpAction::Allow action.

CtlSsb

A flag to disable Speculative Store Bypass mitigations for this filter.

CtlOptimize

A flag to specify the optimization level of the seccomp filter.

ApiSysRawRc

A flag to specify if the libseccomp should pass system error codes back to the caller instead of the default -ECANCELED.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Converts string seccomp filter attribute to ScmpFilterAttr.

Arguments
  • attr - A string filter attribute, e.g. SCMP_FLTATR_*.

See the seccomp_attr_set(3) man page for details on valid filter attribute values.

Errors

If an invalid filter attribute is specified, an error will be returned.

The associated error which can be returned from parsing.
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.