File harden_deepin-shutdown-sound.service.patch of Package deepin-api

Index: dde-api-5.4.9/misc/systemd/system/deepin-shutdown-sound.service
===================================================================
--- dde-api-5.4.9.orig/misc/systemd/system/deepin-shutdown-sound.service
+++ dde-api-5.4.9/misc/systemd/system/deepin-shutdown-sound.service
@@ -5,6 +5,20 @@ After=sound.target local-fs.target
 Before=systemd-logind.service
 
 [Service]
+# added automatically, for details please see
+# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
+ProtectSystem=full
+ProtectHome=true
+PrivateDevices=true
+DeviceAllow=char-snd rw
+ProtectHostname=true
+ProtectClock=true
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectKernelLogs=true
+ProtectControlGroups=true
+RestrictRealtime=true
+# end of automatic additions 
 Type=simple
 ExecStart=/usr/bin/true
 ExecStop=/usr/lib/deepin-api/deepin-shutdown-sound
openSUSE Build Service is sponsored by