Accepting request 915053 from home:jsegitz:branches:systemdhardening:network:telephony

Automatic systemd hardening effort by the security team. This has not been tested. For details please see https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort

OBS-URL: https://build.opensuse.org/request/show/915053
OBS-URL: https://build.opensuse.org/package/show/network:telephony/coturn?expand=0&rev=19
This commit is contained in:
Michael Ströder 2021-08-30 22:28:45 +00:00 committed by Git OBS Bridge
parent 36f26e008a
commit 23890538db
5 changed files with 41 additions and 0 deletions

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Mon Aug 30 11:55:53 UTC 2021 - Johannes Segitz <jsegitz@suse.com>
- Added hardening to systemd service(s). Added patch(es):
* harden_coturn.service.patch
Modified:
* coturn.service
* coturn@.service
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Jan 11 10:27:20 UTC 2021 - Johannes Weberhofer <jweberhofer@weberhofer.at> Mon Jan 11 10:27:20 UTC 2021 - Johannes Weberhofer <jweberhofer@weberhofer.at>

View File

@ -44,6 +44,10 @@ RemoveIPC=yes
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
RestrictNamespaces=yes RestrictNamespaces=yes
RestrictSUIDSGID=yes RestrictSUIDSGID=yes
# added automatically, for details please see
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
RestrictRealtime=true
# end of automatic additions
SystemCallArchitectures=native SystemCallArchitectures=native
SystemCallFilter=~@clock @debug @module @mount @raw-io @reboot @swap @privileged @resources @cpu-emulation @obsolete SystemCallFilter=~@clock @debug @module @mount @raw-io @reboot @swap @privileged @resources @cpu-emulation @obsolete

View File

@ -40,6 +40,7 @@ Source6: %{name}.firewalld
Source7: README.SUSE Source7: README.SUSE
Source8: %{name}-apparmor-usr.bin.turnserver Source8: %{name}-apparmor-usr.bin.turnserver
Source9: %{name}@.service Source9: %{name}@.service
Patch0: harden_coturn.service.patch
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: firewall-macros BuildRequires: firewall-macros
BuildRequires: libevent-devel >= 2.0.0 BuildRequires: libevent-devel >= 2.0.0

View File

@ -44,6 +44,10 @@ RemoveIPC=yes
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
RestrictNamespaces=yes RestrictNamespaces=yes
RestrictSUIDSGID=yes RestrictSUIDSGID=yes
# added automatically, for details please see
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
RestrictRealtime=true
# end of automatic additions
SystemCallArchitectures=native SystemCallArchitectures=native
SystemCallFilter=~@clock @debug @module @mount @raw-io @reboot @swap @privileged @resources @cpu-emulation @obsolete SystemCallFilter=~@clock @debug @module @mount @raw-io @reboot @swap @privileged @resources @cpu-emulation @obsolete

View File

@ -0,0 +1,23 @@
Index: coturn-4.5.2/examples/etc/coturn.service
===================================================================
--- coturn-4.5.2.orig/examples/etc/coturn.service
+++ coturn-4.5.2/examples/etc/coturn.service
@@ -15,6 +15,18 @@ ExecStart=/usr/bin/turnserver -c /etc/tu
Restart=on-failure
InaccessibleDirectories=/home
PrivateTmp=yes
+# added automatically, for details please see
+# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
+ProtectSystem=full
+ProtectHome=true
+ProtectHostname=true
+ProtectClock=true
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectKernelLogs=true
+ProtectControlGroups=true
+RestrictRealtime=true
+# end of automatic additions
[Install]
WantedBy=multi-user.target