2020-11-09 07:23:58 +03:00
# SPDX-License-Identifier: LGPL-2.1-or-later
2017-11-18 19:35:03 +03:00
#
2014-04-29 10:57:51 +04: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 21:44:59 +03:00
ConditionVirtualization = !container
2014-06-17 04:18:33 +04:00
DefaultDependencies = no
2020-04-08 17:24:23 +03:00
After = systemd-sysusers.service
2018-04-30 15:05:29 +03:00
Before = time-set.target sysinit.target shutdown.target
2014-05-20 19:04:11 +04:00
Conflicts = shutdown.target
2020-12-17 22:19:44 +03:00
Wants = time-set.target
2014-04-29 10:57:51 +04:00
[Service]
2017-08-10 10:07:08 +03:00
AmbientCapabilities = CAP_SYS_TIME
2020-09-11 11:56:06 +03:00
BusName = org.freedesktop.timesync1
2018-11-12 19:19:48 +03:00
CapabilityBoundingSet = CAP_SYS_TIME
2020-11-05 13:20:32 +03: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 12:55:36 +03:00
ExecStart = !!{{ROOTLIBEXECDIR}}/systemd-timesyncd
2018-11-12 19:19:48 +03:00
LockPersonality = yes
MemoryDenyWriteExecute = yes
NoNewPrivileges = yes
2014-05-17 22:33:47 +04:00
PrivateDevices = yes
2018-11-12 19:19:48 +03:00
PrivateTmp = yes
2020-08-06 15:50:38 +03:00
ProtectProc = invisible
2016-08-26 14:23:27 +03:00
ProtectControlGroups = yes
2018-11-12 19:19:48 +03:00
ProtectHome = yes
2019-02-19 01:30:12 +03:00
ProtectHostname = yes
2020-08-06 15:50:38 +03:00
ProtectKernelLogs = yes
2017-02-09 13:09:50 +03:00
ProtectKernelModules = yes
2018-11-12 19:19:48 +03:00
ProtectKernelTunables = yes
ProtectSystem = strict
Restart = always
RestartSec = 0
2016-08-26 14:23:27 +03:00
RestrictAddressFamilies = AF_UNIX AF_INET AF_INET6
2018-11-12 19:19:48 +03:00
RestrictNamespaces = yes
RestrictRealtime = yes
2019-03-20 21:52:20 +03:00
RestrictSUIDSGID = yes
2018-04-09 21:39:16 +03:00
RuntimeDirectory = systemd/timesync
2017-08-30 09:59:57 +03:00
StateDirectory = systemd/timesync
2018-11-12 19:19:48 +03:00
SystemCallArchitectures = native
SystemCallErrorNumber = EPERM
SystemCallFilter = @system-service @clock
Type = notify
User = systemd-timesync
2021-05-16 12:55:36 +03:00
{ { S E R V I C E _ W A T C H D O G } }
2014-04-29 10:57:51 +04:00
[Install]
2014-05-20 19:04:11 +04:00
WantedBy = sysinit.target
2018-04-30 17:02:09 +03:00
Alias = dbus-org.freedesktop.timesync1.service