]>
Commit | Line | Data |
---|---|---|
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] | |
11 | Description=Network Time Synchronization | |
12 | Documentation=man:systemd-timesyncd.service(8) | |
13 | ConditionCapability=CAP_SYS_TIME | |
e3bff60a | 14 | ConditionVirtualization=!container |
e842803a | 15 | DefaultDependencies=no |
a10f5d05 | 16 | After=systemd-sysusers.service |
bb4f798a | 17 | Before=time-set.target sysinit.target shutdown.target |
60f067b4 | 18 | Conflicts=shutdown.target |
3a6ce677 | 19 | Wants=time-set.target |
60f067b4 JS |
20 | |
21 | [Service] | |
f5e65279 | 22 | AmbientCapabilities=CAP_SYS_TIME |
a032b68d | 23 | BusName=org.freedesktop.timesync1 |
6e866b33 | 24 | CapabilityBoundingSet=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. | |
28 | Environment=SYSTEMD_NSS_RESOLVE_VALIDATE=0 | |
8b3d4ff0 | 29 | ExecStart=!!{{ROOTLIBEXECDIR}}/systemd-timesyncd |
6e866b33 MB |
30 | LockPersonality=yes |
31 | MemoryDenyWriteExecute=yes | |
32 | NoNewPrivileges=yes | |
60f067b4 | 33 | PrivateDevices=yes |
6e866b33 | 34 | PrivateTmp=yes |
a032b68d | 35 | ProtectProc=invisible |
8a584da2 | 36 | ProtectControlGroups=yes |
6e866b33 | 37 | ProtectHome=yes |
bb4f798a | 38 | ProtectHostname=yes |
a032b68d | 39 | ProtectKernelLogs=yes |
81c58355 | 40 | ProtectKernelModules=yes |
6e866b33 MB |
41 | ProtectKernelTunables=yes |
42 | ProtectSystem=strict | |
43 | Restart=always | |
44 | RestartSec=0 | |
8a584da2 | 45 | RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 |
6e866b33 MB |
46 | RestrictNamespaces=yes |
47 | RestrictRealtime=yes | |
bb4f798a | 48 | RestrictSUIDSGID=yes |
b012e921 | 49 | RuntimeDirectory=systemd/timesync |
f5e65279 | 50 | StateDirectory=systemd/timesync |
6e866b33 MB |
51 | SystemCallArchitectures=native |
52 | SystemCallErrorNumber=EPERM | |
53 | SystemCallFilter=@system-service @clock | |
54 | Type=notify | |
55 | User=systemd-timesync | |
8b3d4ff0 | 56 | {{SERVICE_WATCHDOG}} |
60f067b4 JS |
57 | |
58 | [Install] | |
59 | WantedBy=sysinit.target | |
b012e921 | 60 | Alias=dbus-org.freedesktop.timesync1.service |