summaryrefslogtreecommitdiffstats
path: root/units/systemd-udevd.service.in
diff options
context:
space:
mode:
authorTopi Miettinen <toiwoton@gmail.com>2022-09-25 19:47:53 +0200
committerLennart Poettering <lennart@poettering.net>2022-09-26 11:40:28 +0200
commit75723d31a678bdd6b9d0160834e54dc09e3dedd1 (patch)
tree794bfad1d990e14a62a20a7658774189928ed4d7 /units/systemd-udevd.service.in
parentupdate TODO (diff)
downloadsystemd-75723d31a678bdd6b9d0160834e54dc09e3dedd1.tar.xz
systemd-75723d31a678bdd6b9d0160834e54dc09e3dedd1.zip
units: udev: partially emulate ProtectClock=
Drop CAP_SYS_TIME and CAP_WAKE_ALARM capabilities and block clock-related system calls. Update TODO.
Diffstat (limited to 'units/systemd-udevd.service.in')
-rw-r--r--units/systemd-udevd.service.in2
1 files changed, 2 insertions, 0 deletions
diff --git a/units/systemd-udevd.service.in b/units/systemd-udevd.service.in
index 3579de4a68..e9dbe85ef4 100644
--- a/units/systemd-udevd.service.in
+++ b/units/systemd-udevd.service.in
@@ -16,6 +16,7 @@ Before=sysinit.target
ConditionPathIsReadWrite=/sys
[Service]
+CapabilityBoundingSet=~CAP_SYS_TIME CAP_WAKE_ALARM
Delegate=pids
Type=notify
# Note that udev will reset the value internally for its workers
@@ -34,6 +35,7 @@ RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6
RestrictRealtime=yes
RestrictSUIDSGID=yes
SystemCallFilter=@system-service @module @raw-io bpf
+SystemCallFilter=~@clock
SystemCallErrorNumber=EPERM
SystemCallArchitectures=native
LockPersonality=yes