From e51921b1242b40eefd16f29bcc408c6ac0df1619 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Thu, 12 May 2016 11:34:36 +0200 Subject: Add hardening options to our systemd unit files. --- roles/common/files/lib/systemd/system/bacula-fd.service | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'roles/common/files/lib/systemd') 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 -- cgit v1.2.3