]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
examples: improve chronyd service
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 4 Oct 2021 08:54:40 +0000 (10:54 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Mon, 4 Oct 2021 08:54:40 +0000 (10:54 +0200)
Allow writing logfiles (enabled by logdir or -l option) to /var/log and
don't require /var/spool to exist.

examples/chronyd.service

index 2cac602675a4b899ad27cd7a35be0d09d7c9521e..4fb930efd96a5fe8589d2b7d9104231ff7dd5c03 100644 (file)
@@ -33,7 +33,7 @@ ProtectKernelModules=yes
 ProtectKernelTunables=yes
 ProtectProc=invisible
 ProtectSystem=strict
-ReadWritePaths=/run /var/lib/chrony
+ReadWritePaths=/run /var/lib/chrony -/var/log
 RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
 RestrictNamespaces=yes
 RestrictSUIDSGID=yes
@@ -42,7 +42,7 @@ SystemCallFilter=~@cpu-emulation @debug @module @mount @obsolete @raw-io @reboot
 
 # Adjust restrictions for /usr/sbin/sendmail (mailonchange directive)
 NoNewPrivileges=no
-ReadWritePaths=/var/spool
+ReadWritePaths=-/var/spool
 RestrictAddressFamilies=AF_NETLINK
 
 [Install]