mirror of
https://github.com/systemd/systemd.git
synced 2025-04-01 18:50:16 +03:00
timesyncd: enable DynamicUser=
This commit is contained in:
parent
c31ad02403
commit
48d3e88c18
@ -69,7 +69,7 @@ static int load_clock_timestamp(uid_t uid, gid_t gid) {
|
||||
}
|
||||
|
||||
} else {
|
||||
r = mkdir_safe_label("/var/lib/systemd/timesync", 0755, uid, gid, false);
|
||||
r = mkdir_safe_label("/var/lib/systemd/timesync", 0755, uid, gid, true);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to create state directory: %m");
|
||||
|
||||
|
@ -23,11 +23,10 @@ RestartSec=0
|
||||
ExecStart=!!@rootlibexecdir@/systemd-timesyncd
|
||||
WatchdogSec=3min
|
||||
User=systemd-timesync
|
||||
DynamicUser=yes
|
||||
CapabilityBoundingSet=CAP_SYS_TIME
|
||||
AmbientCapabilities=CAP_SYS_TIME
|
||||
PrivateTmp=yes
|
||||
PrivateDevices=yes
|
||||
ProtectSystem=strict
|
||||
ProtectHome=yes
|
||||
ProtectControlGroups=yes
|
||||
ProtectKernelTunables=yes
|
||||
|
Loading…
x
Reference in New Issue
Block a user