units: set NoNewPrivileges= for all long-running services
authorLennart Poettering <lennart@poettering.net>
Mon, 12 Nov 2018 16:19:48 +0000 (17:19 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 12 Nov 2018 18:02:55 +0000 (19:02 +0100)
commit3ca9940cb95cb263c6bfe5cfee72df232fe46a94
tree1aea17c3bc6b6f4f3abd129e973196d540b98d04
parentd49881a06a3999938459692d953de8d7dd8f2cb2
units: set NoNewPrivileges= for all long-running services

Previously, setting this option by default was problematic due to
SELinux (as this would also prohibit the transition from PID1's label to
the service's label). However, this restriction has since been lifted,
hence let's start making use of this universally in our services.

On SELinux system this change should be synchronized with a policy
update that ensures that NNP-ful transitions from init_t to service
labels is permitted.

An while we are at it: sort the settings in the unit files this touches.
This might increase the size of the change in this case, but hopefully
should result in stabler patches later on.

Fixes: #1219
15 files changed:
units/systemd-coredump@.service.in
units/systemd-hostnamed.service.in
units/systemd-initctl.service.in
units/systemd-journal-gatewayd.service.in
units/systemd-journal-remote.service.in
units/systemd-journal-upload.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-rfkill.service.in
units/systemd-timedated.service.in
units/systemd-timesyncd.service.in