summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/bacula-dir/files/lib/systemd/system/bacula-director.service12
-rw-r--r--roles/bacula-sd/files/lib/systemd/system/bacula-sd.service10
-rw-r--r--roles/common/files/lib/systemd/system/bacula-fd.service10
-rw-r--r--roles/lists/files/lib/systemd/system/wwsympa.service9
-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
6 files changed, 56 insertions, 1 deletions
diff --git a/roles/bacula-dir/files/lib/systemd/system/bacula-director.service b/roles/bacula-dir/files/lib/systemd/system/bacula-director.service
index 7b34c8b..8f952c6 100644
--- a/roles/bacula-dir/files/lib/systemd/system/bacula-director.service
+++ b/roles/bacula-dir/files/lib/systemd/system/bacula-director.service
@@ -7,8 +7,18 @@ Type=forking
PIDFile=/var/run/bacula/bacula-dir.9101.pid
StandardOutput=syslog
User=bacula
-Group=tape
+Group=bacula
ExecStart=/usr/sbin/bacula-dir -c /etc/bacula/bacula-dir.conf
+# Hardening
+NoNewPrivileges=yes
+PrivateDevices=yes
+ProtectHome=yes
+ProtectSystem=full
+ReadOnlyDirectories=/
+ReadWriteDirectories=-/var/lib/bacula
+ReadWriteDirectories=-/var/log/bacula
+ReadWriteDirectories=-/var/run/bacula
+
[Install]
WantedBy=multi-user.target
diff --git a/roles/bacula-sd/files/lib/systemd/system/bacula-sd.service b/roles/bacula-sd/files/lib/systemd/system/bacula-sd.service
index 4c3f81d..ca147a7 100644
--- a/roles/bacula-sd/files/lib/systemd/system/bacula-sd.service
+++ b/roles/bacula-sd/files/lib/systemd/system/bacula-sd.service
@@ -10,5 +10,15 @@ User=bacula
Group=tape
ExecStart=/usr/sbin/bacula-sd -c /etc/bacula/bacula-sd.conf
+# Hardening
+NoNewPrivileges=yes
+PrivateDevices=yes
+ProtectHome=yes
+ProtectSystem=full
+ReadOnlyDirectories=/
+ReadWriteDirectories=-/var/lib/bacula
+ReadWriteDirectories=-/var/run/bacula
+ReadWriteDirectories=/mnt/backup/bacula
+
[Install]
WantedBy=multi-user.target
diff --git a/roles/common/files/lib/systemd/system/bacula-fd.service b/roles/common/files/lib/systemd/system/bacula-fd.service
index 6e2bbd4..07bd2e5 100644
--- a/roles/common/files/lib/systemd/system/bacula-fd.service
+++ b/roles/common/files/lib/systemd/system/bacula-fd.service
@@ -8,5 +8,15 @@ PIDFile=/var/run/bacula/bacula-fd.9112.pid
StandardOutput=syslog
ExecStart=/usr/sbin/bacula-fd -c /etc/bacula/bacula-fd.conf
+# Hardening
+NoNewPrivileges=yes
+PrivateDevices=yes
+ProtectHome=read-only
+ProtectSystem=full
+PrivateTmp=yes
+ReadOnlyDirectories=/
+ReadWriteDirectories=-/var/lib
+ReadWriteDirectories=-/var/run/bacula
+
[Install]
WantedBy=multi-user.target
diff --git a/roles/lists/files/lib/systemd/system/wwsympa.service b/roles/lists/files/lib/systemd/system/wwsympa.service
index ea2a78f..b525145 100644
--- a/roles/lists/files/lib/systemd/system/wwsympa.service
+++ b/roles/lists/files/lib/systemd/system/wwsympa.service
@@ -10,5 +10,14 @@ User=sympa
Group=sympa
ExecStart=/usr/lib/cgi-bin/sympa/wwsympa.fcgi
+# Hardening
+NoNewPrivileges=yes
+PrivateDevices=yes
+ProtectHome=yes
+ProtectSystem=full
+ReadOnlyDirectories=/
+ReadWriteDirectories=-/var/lib/sympa
+ReadWriteDirectories=-/var/run/sympa
+
[Install]
WantedBy=multi-user.target
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