File harden_nut-server.service.patch of Package nut
Index: b/scripts/systemd/nut-server.service.in =================================================================== --- a/scripts/systemd/nut-server.service.in +++ b/scripts/systemd/nut-server.service.in @@ -37,6 +37,17 @@ Documentation=man:nut.conf(@MAN_SECTION_ Documentation=@NUT_WEBSITE_BASE@/docs/man/nut.conf.html [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 # A busy server can be monitoring a lot of devices as well as replying # to many clients. The "infinity" definition is actually capped by OS # settings and hard-coded defaults; typically can be 65535+ nowadays.