nut/harden_nut-monitor.service.patch

23 lines
781 B
Diff

Index: nut-2.7.4/scripts/systemd/nut-monitor.service.in
===================================================================
--- nut-2.7.4.orig/scripts/systemd/nut-monitor.service.in
+++ nut-2.7.4/scripts/systemd/nut-monitor.service.in
@@ -3,6 +3,17 @@ Description=Network UPS Tools - power de
After=local-fs.target network.target nut-server.service
[Service]
+# added automatically, for details please see
+# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
+ProtectSystem=full
+ProtectHome=true
+ProtectHostname=true
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectKernelLogs=true
+ProtectControlGroups=true
+RestrictRealtime=true
+# end of automatic additions
ExecStart=@SBINDIR@/upsmon
PIDFile=@PIDPATH@/upsmon.pid
Type=forking