systemd-timesyncd.service 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. [Unit]
  10. Description=Network Time Synchronization
  11. Documentation=man:systemd-timesyncd.service(8)
  12. ConditionCapability=CAP_SYS_TIME
  13. ConditionVirtualization=!container
  14. DefaultDependencies=no
  15. After=systemd-sysusers.service
  16. Before=time-set.target sysinit.target shutdown.target
  17. Conflicts=shutdown.target
  18. Wants=time-set.target time-sync.target
  19. [Service]
  20. AmbientCapabilities=CAP_SYS_TIME
  21. CapabilityBoundingSet=CAP_SYS_TIME
  22. ExecStart=!!/lib/systemd/systemd-timesyncd
  23. LockPersonality=yes
  24. MemoryDenyWriteExecute=yes
  25. NoNewPrivileges=yes
  26. PrivateDevices=yes
  27. PrivateTmp=yes
  28. ProtectControlGroups=yes
  29. ProtectHome=yes
  30. ProtectHostname=yes
  31. ProtectKernelModules=yes
  32. ProtectKernelTunables=yes
  33. ProtectKernelLogs=yes
  34. ProtectSystem=strict
  35. Restart=always
  36. RestartSec=0
  37. RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
  38. RestrictNamespaces=yes
  39. RestrictRealtime=yes
  40. RestrictSUIDSGID=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. [Install]
  50. WantedBy=sysinit.target
  51. Alias=dbus-org.freedesktop.timesync1.service