diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-11-12 17:19:48 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-11-12 19:02:55 +0100 |
commit | 3ca9940cb95cb263c6bfe5cfee72df232fe46a94 (patch) | |
tree | 1aea17c3bc6b6f4f3abd129e973196d540b98d04 /units/systemd-timedated.service.in | |
parent | d49881a06a3999938459692d953de8d7dd8f2cb2 (diff) | |
download | systemd-3ca9940cb95cb263c6bfe5cfee72df232fe46a94.tar.gz |
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
Diffstat (limited to 'units/systemd-timedated.service.in')
-rw-r--r-- | units/systemd-timedated.service.in | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/units/systemd-timedated.service.in b/units/systemd-timedated.service.in index 906bb4326c..6d53024195 100644 --- a/units/systemd-timedated.service.in +++ b/units/systemd-timedated.service.in @@ -13,23 +13,24 @@ Documentation=man:systemd-timedated.service(8) man:localtime(5) Documentation=https://www.freedesktop.org/wiki/Software/systemd/timedated [Service] -ExecStart=@rootlibexecdir@/systemd-timedated BusName=org.freedesktop.timedate1 -WatchdogSec=3min CapabilityBoundingSet=CAP_SYS_TIME +ExecStart=@rootlibexecdir@/systemd-timedated +IPAddressDeny=any +LockPersonality=yes +MemoryDenyWriteExecute=yes +NoNewPrivileges=yes PrivateTmp=yes -ProtectSystem=strict -ProtectHome=yes ProtectControlGroups=yes -ProtectKernelTunables=yes +ProtectHome=yes ProtectKernelModules=yes -MemoryDenyWriteExecute=yes -RestrictRealtime=yes -RestrictNamespaces=yes +ProtectKernelTunables=yes +ProtectSystem=strict +ReadWritePaths=/etc RestrictAddressFamilies=AF_UNIX -SystemCallFilter=@system-service @clock -SystemCallErrorNumber=EPERM +RestrictNamespaces=yes +RestrictRealtime=yes SystemCallArchitectures=native -LockPersonality=yes -IPAddressDeny=any -ReadWritePaths=/etc +SystemCallErrorNumber=EPERM +SystemCallFilter=@system-service @clock +WatchdogSec=3min |