diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-09-11 17:45:21 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-09-12 14:06:21 +0200 |
commit | 960e4569e17abf7c84f07b697d57ac7d0418edfc (patch) | |
tree | dd8c180c850f0c97fdf6811b6296e79a6d5b7d6b /src/shared/seccomp-util.h | |
parent | 7609340e2f9d5b5fd46fa767dd41184b273d7e48 (diff) | |
download | systemd-960e4569e17abf7c84f07b697d57ac7d0418edfc.tar.gz |
nspawn: implement configurable syscall whitelisting/blacklisting
Now that we have ported nspawn's seccomp code to the generic code in
seccomp-util, let's extend it to support whitelisting and blacklisting
of specific additional syscalls.
This uses similar syntax as PID1's support for system call filtering,
but in contrast to that always implements a blacklist (and not a
whitelist), as we prepopulate the filter with a blacklist, and the
unit's system call filter logic does not come with anything
prepopulated.
(Later on we might actually want to invert the logic here, and
whitelist rather than blacklist things, but at this point let's not do
that. In case we switch this over later, the syscall add/remove logic of
this commit should be compatible conceptually.)
Fixes: #5163
Replaces: #5944
Diffstat (limited to 'src/shared/seccomp-util.h')
-rw-r--r-- | src/shared/seccomp-util.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/seccomp-util.h b/src/shared/seccomp-util.h index 894c53e6fd..c1612f5894 100644 --- a/src/shared/seccomp-util.h +++ b/src/shared/seccomp-util.h @@ -69,7 +69,7 @@ const SyscallFilterSet *syscall_filter_set_find(const char *name); int seccomp_filter_set_add(Set *s, bool b, const SyscallFilterSet *set); -int seccomp_add_syscall_filter_item(scmp_filter_ctx *ctx, const char *name, uint32_t action); +int seccomp_add_syscall_filter_item(scmp_filter_ctx *ctx, const char *name, uint32_t action, char **exclude); int seccomp_load_syscall_filter_set(uint32_t default_action, const SyscallFilterSet *set, uint32_t action); int seccomp_load_syscall_filter_set_raw(uint32_t default_action, Set* set, uint32_t action); |