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/bacula-sd/files/lib/systemd/system/bacula-sd.service | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'roles/bacula-sd') 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 -- cgit v1.2.3