pub trait Notifier: Send + 'static {
// Required method
fn handle(&mut self, fd: OwnedFd);
// Provided methods
fn exempt(&self) -> Vec<(Action, Syscall)> { ... }
fn prepare(&mut self) -> Result<(), String> { ... }
}Expand description
A trait for transmitting a SECCOMP Notify FD to a Monitor.
Executors, such as spawn, should perform the following actions
from the Filter.
- Call
Notifier::exempt() - Call
Notifier::prepare() - Call
seccomp_load() - Call
Notifier::handle()
Then, call execve().
See Antimony for a socket implementation.
Required Methods§
Provided Methods§
Sourcefn exempt(&self) -> Vec<(Action, Syscall)>
fn exempt(&self) -> Vec<(Action, Syscall)>
Return the list of syscalls that are used by the Notifier itself
in order to transmit the SECCOMP FD. These syscalls will be used
between seccomp_load() and execve(). For example, if sending
the FD across a socket, you should pass sendmsg.
The action should NOT be Notify, as that will cause a deadlock. Instead, either Allow, or Log.