Accepting request 926714 from home:jsegitz:branches:systemdhardening:network:messaging:amqp

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/926714
OBS-URL: https://build.opensuse.org/package/show/network:messaging:amqp/rabbitmq-server?expand=0&rev=173
This commit is contained in:
Fusion Future 2021-10-22 02:42:59 +00:00 committed by Git OBS Bridge
parent 6dcbf99947
commit f396e813a1
4 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,24 @@
Index: rabbitmq-server-3.9.8/deps/rabbit/docs/rabbitmq-server.service.example
===================================================================
--- rabbitmq-server-3.9.8.orig/deps/rabbit/docs/rabbitmq-server.service.example
+++ rabbitmq-server-3.9.8/deps/rabbit/docs/rabbitmq-server.service.example
@@ -5,6 +5,19 @@ After=network.target epmd@0.0.0.0.socket
Wants=network.target epmd@0.0.0.0.socket
[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=notify
User=rabbitmq
Group=rabbitmq

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Thu Oct 21 08:16:10 UTC 2021 - Johannes Segitz <jsegitz@suse.com>
- Added hardening to systemd service(s) (bsc#1181400). Added patch(es):
* harden_rabbitmq-server.service.patch
Modified:
* rabbitmq-server.service
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Oct 20 11:17:30 UTC 2021 - Fusion Future <qydwhotmail@gmail.com> Wed Oct 20 11:17:30 UTC 2021 - Fusion Future <qydwhotmail@gmail.com>

View File

@ -4,6 +4,19 @@ After=syslog.target network.target epmd.service
BindsTo=epmd.service BindsTo=epmd.service
[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=notify Type=notify
User=rabbitmq User=rabbitmq
Group=rabbitmq Group=rabbitmq

View File

@ -54,6 +54,7 @@ Source4: rabbitmq-env.conf
Source6: rabbitmq-server.service Source6: rabbitmq-server.service
Source7: https://raw.githubusercontent.com/rabbitmq/rabbitmq-packaging/v%{version}/RPMS/Fedora/rabbitmq-server.tmpfiles Source7: https://raw.githubusercontent.com/rabbitmq/rabbitmq-packaging/v%{version}/RPMS/Fedora/rabbitmq-server.tmpfiles
Source8: README.SUSE Source8: README.SUSE
Patch0: harden_rabbitmq-server.service.patch
BuildRequires: elixir BuildRequires: elixir
# https://www.rabbitmq.com/which-erlang.html # https://www.rabbitmq.com/which-erlang.html
BuildRequires: erlang >= 23.2 BuildRequires: erlang >= 23.2
@ -130,6 +131,7 @@ Optional dependency offering zsh completion for %{name}.
%prep %prep
%setup -q %setup -q
cp %{SOURCE8} . cp %{SOURCE8} .
%patch0 -p1
%build %build
# Make elixir happy with Unicode # Make elixir happy with Unicode