]> git.ipfire.org Git - thirdparty/systemd.git/commit - units/systemd-logind.service.in
units: switch from system call blacklist to whitelist
authorLennart Poettering <lennart@poettering.net>
Thu, 19 Apr 2018 09:04:17 +0000 (11:04 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 14 Jun 2018 15:44:20 +0000 (17:44 +0200)
commitee8f26180d01e3ddd4e5f20b03b81e5e737657ae
treea83771863a9671686e41abb7d4dd3828b5cece5f
parente05ee49b144110b1ecff030cdadc439604152f16
units: switch from system call blacklist to whitelist

This is generally the safer approach, and is what container managers
(including nspawn) do, hence let's move to this too for our own
services. This is particularly useful as this this means the new
@system-service system call filter group will get serious real-life
testing quickly.

This also switches from firing SIGSYS on unexpected syscalls to
returning EPERM. This would have probably been a better default anyway,
but it's hard to change that these days. When whitelisting system calls
SIGSYS is highly problematic as system calls that are newly introduced
to Linux become minefields for services otherwise.

Note that this enables a system call filter for udev for the first time,
and will block @clock, @mount and @swap from it. Some downstream
distributions might want to revert this locally if they want to permit
unsafe operations on udev rules, but in general this shiuld be mostly
safe, as we already set MountFlags=shared for udevd, hence at least
@mount won't change anything.
12 files changed:
units/systemd-coredump@.service.in
units/systemd-hostnamed.service.in
units/systemd-importd.service.in
units/systemd-journald.service.in
units/systemd-localed.service.in
units/systemd-logind.service.in
units/systemd-machined.service.in
units/systemd-networkd.service.in
units/systemd-resolved.service.in
units/systemd-timedated.service.in
units/systemd-timesyncd.service.in
units/systemd-udevd.service.in