From 022d334561ab09ebd497cf9e8af6f606f9ade42c Mon Sep 17 00:00:00 2001 From: Kevin Kuehler Date: Sun, 26 Jan 2020 12:47:50 -0800 Subject: [PATCH] man: doc: Document ProtectClock= --- docs/TRANSIENT-SETTINGS.md | 1 + man/systemd.exec.xml | 27 +++++++++++++++++++++------ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/docs/TRANSIENT-SETTINGS.md b/docs/TRANSIENT-SETTINGS.md index 9f93e3b836..271d8ab1e3 100644 --- a/docs/TRANSIENT-SETTINGS.md +++ b/docs/TRANSIENT-SETTINGS.md @@ -192,6 +192,7 @@ All execution-related settings are available for transient units. ✓ PrivateUsers= ✓ ProtectSystem= ✓ ProtectHome= +✓ ProtectClock= ✓ MountFlags= ✓ MountAPIVFS= ✓ Personality= diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml index c4cada2f27..b7f44c9473 100644 --- a/man/systemd.exec.xml +++ b/man/systemd.exec.xml @@ -405,11 +405,11 @@ CapabilityBoundingSet=~CAP_B CAP_C RestrictAddressFamilies=, RestrictNamespaces=, PrivateDevices=, ProtectKernelTunables=, ProtectKernelModules=, ProtectKernelLogs=, - MemoryDenyWriteExecute=, RestrictRealtime=, - RestrictSUIDSGID=, DynamicUser= or LockPersonality= - are specified. Note that even if this setting is overridden by them, systemctl show shows the - original value of this setting. Also see No New Privileges + ProtectClock=, MemoryDenyWriteExecute=, + RestrictRealtime=, RestrictSUIDSGID=, DynamicUser= + or LockPersonality= are specified. Note that even if this setting is overridden by them, + systemctl show shows the original value of this setting. + Also see No New Privileges Flag. @@ -1296,6 +1296,21 @@ BindReadOnlyPaths=/var/lib/systemd + + ProtectClock= + + Takes a boolean argument. If set, writes to the hardware clock or system clock will be denied. + It is recommended to turn this on for most services that do not need modify the clock. Defaults to off. Enabling + this option removes CAP_SYS_TIME and CAP_WAKE_ALARM from the + capability bounding set for this unit, installs a system call filter to block calls that can set the + clock, and DeviceAllow=char-rtc r is implied. This ensures /dev/rtc0, + /dev/rtc1, etc are made read only to the service. See + systemd.resource-control5 + for the details about DeviceAllow=. + + + + ProtectKernelTunables= @@ -1807,7 +1822,7 @@ SystemCallErrorNumber=EPERM mappings. Specifically these are the options PrivateTmp=, PrivateDevices=, ProtectSystem=, ProtectHome=, ProtectKernelTunables=, ProtectControlGroups=, - ProtectKernelLogs=, ReadOnlyPaths=, + ProtectKernelLogs=, ProtectClock=, ReadOnlyPaths=, InaccessiblePaths= and ReadWritePaths=.