]> git.ipfire.org Git - thirdparty/systemd.git/blob - units/systemd-timesyncd.service.in
Merge pull request #11922 from poettering/hostname-protect-fix
[thirdparty/systemd.git] / units / systemd-timesyncd.service.in
1 # SPDX-License-Identifier: LGPL-2.1+
2 #
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
14 ConditionVirtualization=!container
15 DefaultDependencies=no
16 After=systemd-remount-fs.service systemd-sysusers.service
17 Before=time-sync.target sysinit.target shutdown.target
18 Conflicts=shutdown.target
19 Wants=time-sync.target
20
21 [Service]
22 AmbientCapabilities=CAP_SYS_TIME
23 CapabilityBoundingSet=CAP_SYS_TIME
24 ExecStart=!!@rootlibexecdir@/systemd-timesyncd
25 LockPersonality=yes
26 MemoryDenyWriteExecute=yes
27 NoNewPrivileges=yes
28 PrivateDevices=yes
29 PrivateTmp=yes
30 ProtectControlGroups=yes
31 ProtectHome=yes
32 ProtectHostname=yes
33 ProtectKernelModules=yes
34 ProtectKernelTunables=yes
35 ProtectSystem=strict
36 Restart=always
37 RestartSec=0
38 RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
39 RestrictNamespaces=yes
40 RestrictRealtime=yes
41 RuntimeDirectory=systemd/timesync
42 StateDirectory=systemd/timesync
43 SystemCallArchitectures=native
44 SystemCallErrorNumber=EPERM
45 SystemCallFilter=@system-service @clock
46 Type=notify
47 User=systemd-timesync
48 WatchdogSec=3min
49
50 [Install]
51 WantedBy=sysinit.target
52 Alias=dbus-org.freedesktop.timesync1.service