summaryrefslogtreecommitdiffstats
path: root/roles/munin-master
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2016-05-12 11:34:36 +0200
committerGuilhem Moulin <guilhem@fripost.org>2016-05-12 11:34:36 +0200
commite51921b1242b40eefd16f29bcc408c6ac0df1619 (patch)
tree12f93d8d743d39fc9a4d1d6836d04eccf163b24f /roles/munin-master
parent90d498034b891123350785a134402172de477f4f (diff)
Add hardening options to our systemd unit files.
Diffstat (limited to 'roles/munin-master')
-rw-r--r--roles/munin-master/files/lib/systemd/system/munin-cgi-graph.service8
-rw-r--r--roles/munin-master/files/lib/systemd/system/munin-cgi-html.service8
2 files changed, 16 insertions, 0 deletions
diff --git a/roles/munin-master/files/lib/systemd/system/munin-cgi-graph.service b/roles/munin-master/files/lib/systemd/system/munin-cgi-graph.service
index 9e4d820..99aca7a 100644
--- a/roles/munin-master/files/lib/systemd/system/munin-cgi-graph.service
+++ b/roles/munin-master/files/lib/systemd/system/munin-cgi-graph.service
@@ -10,5 +10,13 @@ User=www-data
Group=munin
ExecStart=/usr/lib/munin/cgi/munin-cgi-graph
+# Hardening
+NoNewPrivileges=yes
+PrivateDevices=yes
+ProtectHome=yes
+ProtectSystem=full
+ReadOnlyDirectories=/
+ReadWriteDirectories=-/var/log/munin
+
[Install]
WantedBy=multi-user.target
diff --git a/roles/munin-master/files/lib/systemd/system/munin-cgi-html.service b/roles/munin-master/files/lib/systemd/system/munin-cgi-html.service
index 11a7470..119d3a2 100644
--- a/roles/munin-master/files/lib/systemd/system/munin-cgi-html.service
+++ b/roles/munin-master/files/lib/systemd/system/munin-cgi-html.service
@@ -10,5 +10,13 @@ User=www-data
Group=munin
ExecStart=/usr/lib/munin/cgi/munin-cgi-html
+# Hardening
+NoNewPrivileges=yes
+PrivateDevices=yes
+ProtectHome=yes
+ProtectSystem=full
+ReadOnlyDirectories=/
+ReadWriteDirectories=-/var/log/munin
+
[Install]
WantedBy=multi-user.target