diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-03-20 19:52:20 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-04-02 16:56:48 +0200 |
commit | 62aa29247c3d74bcec0607c347f2be23cd90675d (patch) | |
tree | 5bbb870abd0f9911b3d7191c4227f980f0aa9fbe | |
parent | 7445db6eb70e8d5989f481d0c5a08ace7047ae5b (diff) | |
download | systemd-62aa29247c3d74bcec0607c347f2be23cd90675d.tar.gz |
units: turn on RestrictSUIDSGID= in most of our long-running daemons
-rw-r--r-- | units/systemd-coredump@.service.in | 1 | ||||
-rw-r--r-- | units/systemd-hostnamed.service.in | 1 | ||||
-rw-r--r-- | units/systemd-journal-remote.service.in | 1 | ||||
-rw-r--r-- | units/systemd-journald.service.in | 1 | ||||
-rw-r--r-- | units/systemd-localed.service.in | 1 | ||||
-rw-r--r-- | units/systemd-logind.service.in | 1 | ||||
-rw-r--r-- | units/systemd-networkd.service.in | 1 | ||||
-rw-r--r-- | units/systemd-resolved.service.in | 1 | ||||
-rw-r--r-- | units/systemd-timedated.service.in | 1 | ||||
-rw-r--r-- | units/systemd-timesyncd.service.in | 1 | ||||
-rw-r--r-- | units/systemd-udevd.service.in | 3 |
11 files changed, 12 insertions, 1 deletions
diff --git a/units/systemd-coredump@.service.in b/units/systemd-coredump@.service.in index f6166fa11c..afb2ab9d17 100644 --- a/units/systemd-coredump@.service.in +++ b/units/systemd-coredump@.service.in @@ -36,6 +36,7 @@ ProtectSystem=strict RestrictAddressFamilies=AF_UNIX RestrictNamespaces=yes RestrictRealtime=yes +RestrictSUIDSGID=yes RuntimeMaxSec=5min StateDirectory=systemd/coredump SystemCallArchitectures=native diff --git a/units/systemd-hostnamed.service.in b/units/systemd-hostnamed.service.in index 9c925e80d9..b4f606cf78 100644 --- a/units/systemd-hostnamed.service.in +++ b/units/systemd-hostnamed.service.in @@ -32,6 +32,7 @@ ReadWritePaths=/etc RestrictAddressFamilies=AF_UNIX RestrictNamespaces=yes RestrictRealtime=yes +RestrictSUIDSGID=yes SystemCallArchitectures=native SystemCallErrorNumber=EPERM SystemCallFilter=@system-service sethostname diff --git a/units/systemd-journal-remote.service.in b/units/systemd-journal-remote.service.in index 71727295c3..dd6322e62c 100644 --- a/units/systemd-journal-remote.service.in +++ b/units/systemd-journal-remote.service.in @@ -30,6 +30,7 @@ ProtectSystem=strict RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 RestrictNamespaces=yes RestrictRealtime=yes +RestrictSUIDSGID=yes SystemCallArchitectures=native User=systemd-journal-remote WatchdogSec=3min diff --git a/units/systemd-journald.service.in b/units/systemd-journald.service.in index 4684f095c0..fab405502a 100644 --- a/units/systemd-journald.service.in +++ b/units/systemd-journald.service.in @@ -28,6 +28,7 @@ RestartSec=0 RestrictAddressFamilies=AF_UNIX AF_NETLINK RestrictNamespaces=yes RestrictRealtime=yes +RestrictSUIDSGID=yes Sockets=systemd-journald.socket systemd-journald-dev-log.socket systemd-journald-audit.socket StandardOutput=null SystemCallArchitectures=native diff --git a/units/systemd-localed.service.in b/units/systemd-localed.service.in index a64e7e79a8..7bca34409a 100644 --- a/units/systemd-localed.service.in +++ b/units/systemd-localed.service.in @@ -33,6 +33,7 @@ ReadWritePaths=/etc RestrictAddressFamilies=AF_UNIX RestrictNamespaces=yes RestrictRealtime=yes +RestrictSUIDSGID=yes SystemCallArchitectures=native SystemCallErrorNumber=EPERM SystemCallFilter=@system-service diff --git a/units/systemd-logind.service.in b/units/systemd-logind.service.in index 9c8938ec4a..3eef95c661 100644 --- a/units/systemd-logind.service.in +++ b/units/systemd-logind.service.in @@ -40,6 +40,7 @@ RestartSec=0 RestrictAddressFamilies=AF_UNIX AF_NETLINK RestrictNamespaces=yes RestrictRealtime=yes +RestrictSUIDSGID=yes RuntimeDirectory=systemd/sessions systemd/seats systemd/users systemd/inhibit systemd/shutdown RuntimeDirectoryPreserve=yes SystemCallArchitectures=native diff --git a/units/systemd-networkd.service.in b/units/systemd-networkd.service.in index 472ef045de..2c74da6f1e 100644 --- a/units/systemd-networkd.service.in +++ b/units/systemd-networkd.service.in @@ -34,6 +34,7 @@ RestartSec=0 RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6 AF_PACKET RestrictNamespaces=yes RestrictRealtime=yes +RestrictSUIDSGID=yes RuntimeDirectory=systemd/netif RuntimeDirectoryPreserve=yes SystemCallArchitectures=native diff --git a/units/systemd-resolved.service.in b/units/systemd-resolved.service.in index 3144b70063..eee5d5ea8f 100644 --- a/units/systemd-resolved.service.in +++ b/units/systemd-resolved.service.in @@ -38,6 +38,7 @@ RestartSec=0 RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6 RestrictNamespaces=yes RestrictRealtime=yes +RestrictSUIDSGID=yes RuntimeDirectory=systemd/resolve RuntimeDirectoryPreserve=yes SystemCallArchitectures=native diff --git a/units/systemd-timedated.service.in b/units/systemd-timedated.service.in index 46ee8c894d..df546f471f 100644 --- a/units/systemd-timedated.service.in +++ b/units/systemd-timedated.service.in @@ -31,6 +31,7 @@ ReadWritePaths=/etc RestrictAddressFamilies=AF_UNIX RestrictNamespaces=yes RestrictRealtime=yes +RestrictSUIDSGID=yes SystemCallArchitectures=native SystemCallErrorNumber=EPERM SystemCallFilter=@system-service @clock diff --git a/units/systemd-timesyncd.service.in b/units/systemd-timesyncd.service.in index 5313a90c30..6512531e1c 100644 --- a/units/systemd-timesyncd.service.in +++ b/units/systemd-timesyncd.service.in @@ -38,6 +38,7 @@ RestartSec=0 RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 RestrictNamespaces=yes RestrictRealtime=yes +RestrictSUIDSGID=yes RuntimeDirectory=systemd/timesync StateDirectory=systemd/timesync SystemCallArchitectures=native diff --git a/units/systemd-udevd.service.in b/units/systemd-udevd.service.in index fb98ca4d43..e8a76cc018 100644 --- a/units/systemd-udevd.service.in +++ b/units/systemd-udevd.service.in @@ -28,8 +28,9 @@ TasksMax=infinity PrivateMounts=yes ProtectHostname=yes MemoryDenyWriteExecute=yes -RestrictRealtime=yes RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6 +RestrictRealtime=yes +RestrictSUIDSGID=yes SystemCallFilter=@system-service @module @raw-io SystemCallErrorNumber=EPERM SystemCallArchitectures=native |