2020-11-09 13:23:58 +09:00
# SPDX-License-Identifier: LGPL-2.1-or-later
2017-11-18 17:35:03 +01:00
#
2014-04-29 08:57:51 +02:00
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description = Network Time Synchronization
Documentation = man:systemd-timesyncd.service(8)
ConditionCapability = CAP_SYS_TIME
2015-03-15 19:44:59 +01:00
ConditionVirtualization = !container
2014-06-17 02:18:33 +02:00
DefaultDependencies = no
2020-04-08 16:24:23 +02:00
After = systemd-sysusers.service
2018-04-30 07:05:29 -05:00
Before = time-set.target sysinit.target shutdown.target
2014-05-21 00:04:11 +09:00
Conflicts = shutdown.target
2020-12-17 20:19:44 +01:00
Wants = time-set.target
2014-04-29 08:57:51 +02:00
[Service]
2017-08-10 16:07:08 +09:00
AmbientCapabilities = CAP_SYS_TIME
2020-09-11 10:56:06 +02:00
BusName = org.freedesktop.timesync1
2018-11-12 17:19:48 +01:00
CapabilityBoundingSet = CAP_SYS_TIME
2020-11-05 11:20:32 +01:00
# Turn off DNSSEC validation for hostname look-ups, since those need the
# correct time to work, but we likely won't acquire that without NTP. Let's
# break this chicken-and-egg cycle here.
Environment = SYSTEMD_NSS_RESOLVE_VALIDATE=0
2021-05-16 11:55:36 +02:00
ExecStart = !!{{ROOTLIBEXECDIR}}/systemd-timesyncd
2018-11-12 17:19:48 +01:00
LockPersonality = yes
MemoryDenyWriteExecute = yes
NoNewPrivileges = yes
2014-05-17 20:33:47 +02:00
PrivateDevices = yes
2018-11-12 17:19:48 +01:00
PrivateTmp = yes
2020-08-06 14:50:38 +02:00
ProtectProc = invisible
2016-08-26 13:23:27 +02:00
ProtectControlGroups = yes
2018-11-12 17:19:48 +01:00
ProtectHome = yes
2019-02-19 00:30:12 +02:00
ProtectHostname = yes
2020-08-06 14:50:38 +02:00
ProtectKernelLogs = yes
2017-02-09 11:09:50 +01:00
ProtectKernelModules = yes
2018-11-12 17:19:48 +01:00
ProtectKernelTunables = yes
ProtectSystem = strict
Restart = always
RestartSec = 0
2016-08-26 13:23:27 +02:00
RestrictAddressFamilies = AF_UNIX AF_INET AF_INET6
2018-11-12 17:19:48 +01:00
RestrictNamespaces = yes
RestrictRealtime = yes
2019-03-20 19:52:20 +01:00
RestrictSUIDSGID = yes
2018-04-09 13:39:16 -05:00
RuntimeDirectory = systemd/timesync
2017-08-30 15:59:57 +09:00
StateDirectory = systemd/timesync
2018-11-12 17:19:48 +01:00
SystemCallArchitectures = native
SystemCallErrorNumber = EPERM
SystemCallFilter = @system-service @clock
Type = notify
User = systemd-timesync
2021-05-16 11:55:36 +02:00
{ { S E R V I C E _ W A T C H D O G } }
2014-04-29 08:57:51 +02:00
[Install]
2014-05-21 00:04:11 +09:00
WantedBy = sysinit.target
2018-04-30 23:02:09 +09:00
Alias = dbus-org.freedesktop.timesync1.service