File harden_deepin-login-sound.service.patch of Package deepin-api
diff -Nurp dde-api-5.5.25/misc/systemd/system/deepin-login-sound.service dde-api-5.5.25-new/misc/systemd/system/deepin-login-sound.service
--- dde-api-5.5.25/misc/systemd/system/deepin-login-sound.service 2022-04-18 13:40:18.000000000 +0800
+++ dde-api-5.5.25-new/misc/systemd/system/deepin-login-sound.service 2022-08-13 16:29:10.631634682 +0800
@@ -4,6 +4,19 @@ Requires=sound.target
After=dbus.service lightdm.service
[Service]
+# added automatically, for details please see
+# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
+ProtectSystem=full
+ProtectHome=true
+PrivateDevices=true
+ProtectHostname=true
+ProtectClock=true
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectKernelLogs=true
+ProtectControlGroups=true
+RestrictRealtime=true
+# end of automatic additions
Type=oneshot
ExecStart=/usr/bin/dbus-send --system --print-reply --dest=com.deepin.api.SoundThemePlayer /com/deepin/api/SoundThemePlayer com.deepin.api.SoundThemePlayer.PlaySoundDesktopLogin
RemainAfterExit=yes