1 # SPDX-License-Identifier: LGPL-2.1-or-later
3 # This file is part of systemd.
5 # systemd is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU Lesser General Public License as published by
7 # the Free Software Foundation; either version 2.1 of the License, or
8 # (at your option) any later version.
11 Description=Network Time Synchronization
12 Documentation=man:systemd-timesyncd.service(8)
13 ConditionCapability=CAP_SYS_TIME
14 ConditionVirtualization=!container
15 DefaultDependencies=no
16 After=systemd-sysusers.service
17 Before=time-set.target sysinit.target shutdown.target
18 Conflicts=shutdown.target
22 AmbientCapabilities=CAP_SYS_TIME
23 BusName=org.freedesktop.timesync1
24 CapabilityBoundingSet=CAP_SYS_TIME
25 # Turn off DNSSEC validation for hostname look-ups, since those need the
26 # correct time to work, but we likely won't acquire that without NTP. Let's
27 # break this chicken-and-egg cycle here.
28 Environment=SYSTEMD_NSS_RESOLVE_VALIDATE=0
29 ExecStart=!!@rootlibexecdir@/systemd-timesyncd
31 MemoryDenyWriteExecute=yes
36 ProtectControlGroups=yes
40 ProtectKernelModules=yes
41 ProtectKernelTunables=yes
45 RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
46 RestrictNamespaces=yes
49 RuntimeDirectory=systemd/timesync
50 StateDirectory=systemd/timesync
51 SystemCallArchitectures=native
52 SystemCallErrorNumber=EPERM
53 SystemCallFilter=@system-service @clock
59 WantedBy=sysinit.target
60 Alias=dbus-org.freedesktop.timesync1.service