File harden_nut-server.service.patch of Package nut
diff -purN a/scripts/systemd/nut-server.service.in b/scripts/systemd/nut-server.service.in
--- a/scripts/systemd/nut-server.service.in 2023-10-07 16:06:44.000000000 +0200
+++ b/scripts/systemd/nut-server.service.in 2023-11-03 19:49:51.496940092 +0100
@@ -26,6 +26,17 @@ Before=nut-monitor.service
PartOf=nut.target
[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
EnvironmentFile=-@CONFPATH@/nut.conf
SyslogIdentifier=%N
# Note: foreground mode "-F" by default skips writing a PID file (and