File harden_onedrive@.service.patch of Package onedrive
Index: onedrive-2.4.13/contrib/systemd/onedrive@.service.in
===================================================================
--- onedrive-2.4.13.orig/contrib/systemd/onedrive@.service.in
+++ onedrive-2.4.13/contrib/systemd/onedrive@.service.in
@@ -5,6 +5,18 @@ After=network-online.target
Wants=network-online.target
[Service]
+# added automatically, for details please see
+# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
+ProtectSystem=full
+#PrivateDevices=true
+ProtectHostname=true
+#ProtectClock=true
+ProtectKernelTunables=true
+#ProtectKernelModules=true
+#ProtectKernelLogs=true
+ProtectControlGroups=true
+RestrictRealtime=true
+# end of automatic additions
ExecStart=@prefix@/bin/onedrive --monitor --confdir=/home/%i/.config/onedrive
User=%i
Group=users