pub struct SeccompState { /* private fields */ }Expand description
Per-process state that cannot be stored in the container (e.g., whether there is a container).
Implementations§
Source§impl SeccompState
impl SeccompState
pub fn from(state: &SeccompState) -> SeccompState
pub fn get(&self) -> SeccompStateValue
pub fn set(&self, state: &SeccompStateValue) -> Result<(), Errno>
Sourcepub fn do_strict(
locked: &mut Locked<Unlocked>,
task: &Task,
syscall: &Syscall,
) -> Option<Result<SyscallResult, Errno>>
pub fn do_strict( locked: &mut Locked<Unlocked>, task: &Task, syscall: &Syscall, ) -> Option<Result<SyscallResult, Errno>>
Check to see if this syscall is allowed in STRICT mode, and, if not, send the current task a SIGKILL.
Sourcepub fn do_user_defined(
locked: &mut Locked<Unlocked>,
result: SeccompFilterResult,
current_task: &mut CurrentTask,
syscall: &Syscall,
) -> Option<Result<SyscallResult, Errno>>
pub fn do_user_defined( locked: &mut Locked<Unlocked>, result: SeccompFilterResult, current_task: &mut CurrentTask, syscall: &Syscall, ) -> Option<Result<SyscallResult, Errno>>
Take the given |action| on the given |task|. The action is one of the SECCOMP_RET values (ALLOW, LOG, KILL, KILL_PROCESS, TRAP, ERRNO, USER_NOTIF, TRACE). |task| is the thread that invoked the syscall, and |syscall| is the syscall that was invoked. Returns the result that the syscall will be forced to return by this filter, or None, if the syscall should return its actual return value.
Trait Implementations§
Source§impl Default for SeccompState
impl Default for SeccompState
Source§fn default() -> SeccompState
fn default() -> SeccompState
Returns the “default value” for a type. Read more
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§
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, 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<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 moreSource§impl<T, U> MultiArchFrom<T> for Uwhere
U: From<T>,
impl<T, U> MultiArchFrom<T> for Uwhere
U: From<T>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
type Error = <U as TryFromExt<T>>::Error
§fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
Tries to perform the conversion.