]> git.ipfire.org Git - thirdparty/systemd.git/commit
nspawn: implement configurable syscall whitelisting/blacklisting 6798/head
authorLennart Poettering <lennart@poettering.net>
Mon, 11 Sep 2017 15:45:21 +0000 (17:45 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 12 Sep 2017 12:06:21 +0000 (14:06 +0200)
commit960e4569e17abf7c84f07b697d57ac7d0418edfc
treedd8c180c850f0c97fdf6811b6296e79a6d5b7d6b
parent7609340e2f9d5b5fd46fa767dd41184b273d7e48
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
man/systemd-nspawn.xml
man/systemd.nspawn.xml
src/nspawn/nspawn-gperf.gperf
src/nspawn/nspawn-seccomp.c
src/nspawn/nspawn-seccomp.h
src/nspawn/nspawn-settings.c
src/nspawn/nspawn-settings.h
src/nspawn/nspawn.c
src/shared/seccomp-util.c
src/shared/seccomp-util.h