]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
examples: improve systemd unit files
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 30 Jan 2017 14:07:48 +0000 (15:07 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 31 Jan 2017 10:22:11 +0000 (11:22 +0100)
Add the PrivateTmp, ProtectHome, and ProtectSystem directives to better
secure the system from chronyd. It's taken from the Debian chrony
package.

examples/chrony-wait.service
examples/chronyd.service

index f629ad9b2aee18ef99e774268b60de28417024c1..0f5e2e7613e9224f2625c6630d60d945d464221c 100644 (file)
@@ -1,5 +1,6 @@
 [Unit]
 Description=Wait for chrony to synchronize system clock
+Documentation=man:chronyc(1)
 After=chronyd.service
 Requires=chronyd.service
 Before=time-sync.target
index 927a478fa28e35b7271321c5ad3bac790b27a0b2..4ffe3b194fc9708fbac133bb0f922c239afbcba3 100644 (file)
@@ -10,6 +10,9 @@ Type=forking
 PIDFile=/var/run/chronyd.pid
 EnvironmentFile=-/etc/sysconfig/chronyd
 ExecStart=/usr/sbin/chronyd $OPTIONS
+PrivateTmp=yes
+ProtectHome=yes
+ProtectSystem=full
 
 [Install]
 WantedBy=multi-user.target