units: enable MaxConnectionsPerSocket= for all our Accept=yes units

Let's make sure that user's cannot DoS services for other users so
easily, and enable MaxConnectionsPerSocket= by default for all of them.

Note that this is mostly paranoia for systemd-pcrextend.socket and
systemd-sysext.socket: the socket is only accessible to root anyway,
hence the accounting shouldn#t change anything. But this is just a
safety net, in preparation that we open up some functionality of these
services sooner or later.
This commit is contained in:
Lennart Poettering 2024-02-07 13:19:54 +01:00
parent 48930a5ded
commit 5d1e8cd3e0
4 changed files with 4 additions and 0 deletions

View File

@ -19,3 +19,4 @@ ListenSequentialPacket=/run/systemd/coredump
SocketMode=0600
Accept=yes
MaxConnections=16
MaxConnectionsPerSource=8

View File

@ -18,3 +18,4 @@ ListenStream=/run/systemd/io.systemd.Credentials
FileDescriptorName=varlink
SocketMode=0666
Accept=yes
MaxConnectionsPerSource=16

View File

@ -20,6 +20,7 @@ ListenStream=/run/systemd/io.systemd.PCRExtend
FileDescriptorName=varlink
SocketMode=0600
Accept=yes
MaxConnectionsPerSource=16
[Install]
WantedBy=sockets.target

View File

@ -20,6 +20,7 @@ ListenStream=/run/systemd/io.systemd.sysext
FileDescriptorName=varlink
SocketMode=0600
Accept=yes
MaxConnectionsPerSource=16
[Install]
WantedBy=sockets.target