]> git.proxmox.com Git - systemd.git/blame - units/systemd-timesyncd.service.in
Fix boot-and-services autopkgtest
[systemd.git] / units / systemd-timesyncd.service.in
CommitLineData
a032b68d 1# SPDX-License-Identifier: LGPL-2.1-or-later
52ad194e 2#
60f067b4
JS
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
e3bff60a 14ConditionVirtualization=!container
e842803a 15DefaultDependencies=no
a10f5d05 16After=systemd-sysusers.service
bb4f798a 17Before=time-set.target sysinit.target shutdown.target
60f067b4 18Conflicts=shutdown.target
3a6ce677 19Wants=time-set.target
60f067b4
JS
20
21[Service]
f5e65279 22AmbientCapabilities=CAP_SYS_TIME
a032b68d 23BusName=org.freedesktop.timesync1
6e866b33 24CapabilityBoundingSet=CAP_SYS_TIME
3a6ce677
BR
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
8b3d4ff0 29ExecStart=!!{{ROOTLIBEXECDIR}}/systemd-timesyncd
6e866b33
MB
30LockPersonality=yes
31MemoryDenyWriteExecute=yes
32NoNewPrivileges=yes
60f067b4 33PrivateDevices=yes
6e866b33 34PrivateTmp=yes
a032b68d 35ProtectProc=invisible
8a584da2 36ProtectControlGroups=yes
6e866b33 37ProtectHome=yes
bb4f798a 38ProtectHostname=yes
a032b68d 39ProtectKernelLogs=yes
81c58355 40ProtectKernelModules=yes
6e866b33
MB
41ProtectKernelTunables=yes
42ProtectSystem=strict
43Restart=always
44RestartSec=0
8a584da2 45RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
6e866b33
MB
46RestrictNamespaces=yes
47RestrictRealtime=yes
bb4f798a 48RestrictSUIDSGID=yes
b012e921 49RuntimeDirectory=systemd/timesync
f5e65279 50StateDirectory=systemd/timesync
6e866b33
MB
51SystemCallArchitectures=native
52SystemCallErrorNumber=EPERM
53SystemCallFilter=@system-service @clock
54Type=notify
55User=systemd-timesync
8b3d4ff0 56{{SERVICE_WATCHDOG}}
60f067b4
JS
57
58[Install]
59WantedBy=sysinit.target
b012e921 60Alias=dbus-org.freedesktop.timesync1.service