Expand description
extrasafe is a library that makes it easy to improve your program’s security by selectively allowing the syscalls it can perform via the Linux kernel’s seccomp facilities.
See the SafetyContext struct’s documentation and the tests/ and examples/ directories for
more information on how to use it.
Re-exports§
Modules§
- builtins
- Built-in
RuleSets - error
- Extrasafe error types
- macros
- Macros for extrasafe
- syscalls
- Syscalls export This module re-exports syscalls for the target architecture.
Macros§
- seccomp_
arg_ filter - A macro to easily create
crate::SeccompArgumentFilters. Note that because internally it uses a helper macro, to use this macro you should justuse extrasafe::*if possible. Usage:
Structs§
- Safety
Context - A struct representing a set of rules to be loaded into a seccomp filter and applied to the current thread, or all threads in the current process.
- Seccomp
Argument Filter - A restriction on the arguments of a syscall. May be combined with other
SeccompArgumentFilteras part of a singleSeccompRule, in which case they are and-ed together and must all return true for the syscall to be allowed. - Seccomp
Rule - A seccomp rule.
- Seccompiler
Argument Filter - Condition that a syscall must match in order to satisfy a rule.
- Seccompiler
Filter - Filter containing rules assigned to syscall numbers.
- Seccompiler
Rule - Rule that a filter attempts to match for a syscall.
Enums§
- Seccompiler
Comparator - Comparison to perform when matching a condition.
- Seccompiler
Error - Library errors.
Traits§
- RuleSet
- A
RuleSetis a collection ofSeccompRuleandLandlockRules that enable a functionality, such as opening files or starting threads.