]> git.ipfire.org Git - thirdparty/systemd.git/blame - units/systemd-timesyncd.service.in
units: turn off DNSSEC validation when timesyncd resolves hostnames
[thirdparty/systemd.git] / units / systemd-timesyncd.service.in
CommitLineData
db9ecf05 1# SPDX-License-Identifier: LGPL-2.1-or-later
a7df2d1e 2#
a91df40e
KS
3# This file is part of systemd.
4#
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.
9
10[Unit]
11Description=Network Time Synchronization
12Documentation=man:systemd-timesyncd.service(8)
13ConditionCapability=CAP_SYS_TIME
4b16233e 14ConditionVirtualization=!container
689d781b 15DefaultDependencies=no
e0f968ad 16After=systemd-sysusers.service
4ea0f675 17Before=time-set.target sysinit.target shutdown.target
ece6e766 18Conflicts=shutdown.target
d2004ee5 19Wants=time-set.target
a91df40e
KS
20
21[Service]
87a85e25 22AmbientCapabilities=CAP_SYS_TIME
e67b818c 23BusName=org.freedesktop.timesync1
3ca9940c 24CapabilityBoundingSet=CAP_SYS_TIME
abf4e5c1
LP
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.
28Environment=SYSTEMD_NSS_RESOLVE_VALIDATE=0
3ca9940c
LP
29ExecStart=!!@rootlibexecdir@/systemd-timesyncd
30LockPersonality=yes
31MemoryDenyWriteExecute=yes
32NoNewPrivileges=yes
a349eb10 33PrivateDevices=yes
3ca9940c 34PrivateTmp=yes
24da96a1 35ProtectProc=invisible
0c28d51a 36ProtectControlGroups=yes
3ca9940c 37ProtectHome=yes
99894b86 38ProtectHostname=yes
24da96a1 39ProtectKernelLogs=yes
b6c7278c 40ProtectKernelModules=yes
3ca9940c
LP
41ProtectKernelTunables=yes
42ProtectSystem=strict
43Restart=always
44RestartSec=0
0c28d51a 45RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
3ca9940c
LP
46RestrictNamespaces=yes
47RestrictRealtime=yes
62aa2924 48RestrictSUIDSGID=yes
2dd79846 49RuntimeDirectory=systemd/timesync
53d133ea 50StateDirectory=systemd/timesync
3ca9940c
LP
51SystemCallArchitectures=native
52SystemCallErrorNumber=EPERM
53SystemCallFilter=@system-service @clock
54Type=notify
55User=systemd-timesync
21d0dd5a 56@SERVICE_WATCHDOG@
a91df40e
KS
57
58[Install]
ece6e766 59WantedBy=sysinit.target
e7dd3947 60Alias=dbus-org.freedesktop.timesync1.service