mirror of
https://github.com/systemd/systemd.git
synced 2025-01-20 18:04:03 +03:00
units: tighten system call filters a bit
Take away kernel keyring access, CPU emulation system calls and various debug system calls from the various daemons we have.
This commit is contained in:
parent
1f9ac68b5b
commit
4e069746fe
@ -21,4 +21,4 @@ PrivateNetwork=yes
|
|||||||
ProtectSystem=yes
|
ProtectSystem=yes
|
||||||
ProtectHome=yes
|
ProtectHome=yes
|
||||||
MemoryDenyWriteExecute=yes
|
MemoryDenyWriteExecute=yes
|
||||||
SystemCallFilter=~@clock @module @mount @obsolete @raw-io ptrace
|
SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io
|
||||||
|
@ -18,4 +18,4 @@ NoNewPrivileges=yes
|
|||||||
WatchdogSec=3min
|
WatchdogSec=3min
|
||||||
KillMode=mixed
|
KillMode=mixed
|
||||||
MemoryDenyWriteExecute=yes
|
MemoryDenyWriteExecute=yes
|
||||||
SystemCallFilter=~@clock @module @mount @obsolete @raw-io ptrace
|
SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io
|
||||||
|
@ -25,7 +25,7 @@ CapabilityBoundingSet=CAP_SYS_ADMIN CAP_DAC_OVERRIDE CAP_SYS_PTRACE CAP_SYSLOG C
|
|||||||
WatchdogSec=3min
|
WatchdogSec=3min
|
||||||
FileDescriptorStoreMax=1024
|
FileDescriptorStoreMax=1024
|
||||||
MemoryDenyWriteExecute=yes
|
MemoryDenyWriteExecute=yes
|
||||||
SystemCallFilter=~@clock @module @mount @obsolete @raw-io ptrace
|
SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io
|
||||||
|
|
||||||
# Increase the default a bit in order to allow many simultaneous
|
# Increase the default a bit in order to allow many simultaneous
|
||||||
# services being run since we keep one fd open per service. Also, when
|
# services being run since we keep one fd open per service. Also, when
|
||||||
|
@ -21,4 +21,4 @@ PrivateNetwork=yes
|
|||||||
ProtectSystem=yes
|
ProtectSystem=yes
|
||||||
ProtectHome=yes
|
ProtectHome=yes
|
||||||
MemoryDenyWriteExecute=yes
|
MemoryDenyWriteExecute=yes
|
||||||
SystemCallFilter=~@clock @module @mount @obsolete @privileged @raw-io ptrace
|
SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io
|
||||||
|
@ -26,7 +26,7 @@ BusName=org.freedesktop.login1
|
|||||||
CapabilityBoundingSet=CAP_SYS_ADMIN CAP_MAC_ADMIN CAP_AUDIT_CONTROL CAP_CHOWN CAP_KILL CAP_DAC_READ_SEARCH CAP_DAC_OVERRIDE CAP_FOWNER CAP_SYS_TTY_CONFIG
|
CapabilityBoundingSet=CAP_SYS_ADMIN CAP_MAC_ADMIN CAP_AUDIT_CONTROL CAP_CHOWN CAP_KILL CAP_DAC_READ_SEARCH CAP_DAC_OVERRIDE CAP_FOWNER CAP_SYS_TTY_CONFIG
|
||||||
WatchdogSec=3min
|
WatchdogSec=3min
|
||||||
MemoryDenyWriteExecute=yes
|
MemoryDenyWriteExecute=yes
|
||||||
SystemCallFilter=~@clock @module @mount @obsolete @raw-io ptrace
|
SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @obsolete @raw-io
|
||||||
|
|
||||||
# Increase the default a bit in order to allow many simultaneous
|
# Increase the default a bit in order to allow many simultaneous
|
||||||
# logins since we keep one fd open per session.
|
# logins since we keep one fd open per session.
|
||||||
|
@ -18,7 +18,7 @@ BusName=org.freedesktop.machine1
|
|||||||
CapabilityBoundingSet=CAP_KILL CAP_SYS_PTRACE CAP_SYS_ADMIN CAP_SETGID CAP_SYS_CHROOT CAP_DAC_READ_SEARCH CAP_DAC_OVERRIDE CAP_CHOWN CAP_FOWNER CAP_FSETID CAP_MKNOD
|
CapabilityBoundingSet=CAP_KILL CAP_SYS_PTRACE CAP_SYS_ADMIN CAP_SETGID CAP_SYS_CHROOT CAP_DAC_READ_SEARCH CAP_DAC_OVERRIDE CAP_CHOWN CAP_FOWNER CAP_FSETID CAP_MKNOD
|
||||||
WatchdogSec=3min
|
WatchdogSec=3min
|
||||||
MemoryDenyWriteExecute=yes
|
MemoryDenyWriteExecute=yes
|
||||||
SystemCallFilter=~@clock @module @mount @obsolete @raw-io ptrace
|
SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io
|
||||||
|
|
||||||
# Note that machined cannot be placed in a mount namespace, since it
|
# Note that machined cannot be placed in a mount namespace, since it
|
||||||
# needs access to the host's mount namespace in order to implement the
|
# needs access to the host's mount namespace in order to implement the
|
||||||
|
@ -32,7 +32,7 @@ ProtectSystem=full
|
|||||||
ProtectHome=yes
|
ProtectHome=yes
|
||||||
WatchdogSec=3min
|
WatchdogSec=3min
|
||||||
MemoryDenyWriteExecute=yes
|
MemoryDenyWriteExecute=yes
|
||||||
SystemCallFilter=~@clock @module @mount @obsolete @raw-io ptrace
|
SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -28,7 +28,7 @@ ProtectSystem=full
|
|||||||
ProtectHome=yes
|
ProtectHome=yes
|
||||||
WatchdogSec=3min
|
WatchdogSec=3min
|
||||||
MemoryDenyWriteExecute=yes
|
MemoryDenyWriteExecute=yes
|
||||||
SystemCallFilter=~@clock @module @mount @obsolete @raw-io ptrace
|
SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -19,4 +19,4 @@ PrivateTmp=yes
|
|||||||
ProtectSystem=yes
|
ProtectSystem=yes
|
||||||
ProtectHome=yes
|
ProtectHome=yes
|
||||||
MemoryDenyWriteExecute=yes
|
MemoryDenyWriteExecute=yes
|
||||||
SystemCallFilter=~@module @mount @obsolete @raw-io ptrace
|
SystemCallFilter=~@cpu-emulation @debug @keyring @module @mount @obsolete @raw-io
|
||||||
|
@ -29,7 +29,7 @@ ProtectSystem=full
|
|||||||
ProtectHome=yes
|
ProtectHome=yes
|
||||||
WatchdogSec=3min
|
WatchdogSec=3min
|
||||||
MemoryDenyWriteExecute=yes
|
MemoryDenyWriteExecute=yes
|
||||||
SystemCallFilter=~@module @mount @obsolete @raw-io ptrace
|
SystemCallFilter=~@cpu-emulation @debug @keyring @module @mount @obsolete @raw-io
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=sysinit.target
|
WantedBy=sysinit.target
|
||||||
|
Loading…
x
Reference in New Issue
Block a user