Struct syscallz::Context [−][src]
pub struct Context { /* fields omitted */ }
Expand description
The context to configure and enforce seccomp rules
Implementations
Create a new seccomp context and use
DEFAULT_KILL
as the default action.
Create a new seccomp context with the given Action as default action.
Allow the given syscall regardless of the arguments.
Execute the given action for the given syscall. This can be used to either allow or deny a syscall, regardless of the arguments.
pub fn set_rule_for_syscall(
&mut self,
action: Action,
syscall: Syscall,
comparators: &[Comparator]
) -> Result<()>
pub fn set_rule_for_syscall(
&mut self,
action: Action,
syscall: Syscall,
comparators: &[Comparator]
) -> Result<()>
Execute a given action for a given syscall if the
Comparator
s match the given arguments.
Generate and output the current seccomp filter in BPF (Berkeley Packet Filter) format. The output is suitable to be loaded into the kernel. The filter is written to the given file descriptor.
Generate and output the current seccomp filter in PFC (Pseudo Filter Code) format. The output is human read and meant to be used for debugging for developers. The filter is written to the given file descriptor.