From 79c5fd69771f3567ca1249a003d5f57789aae137 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 16 2018 12:48:55 +0000 Subject: import initscripts-9.49.41-1.el7_5.1 --- diff --git a/SOURCES/initscripts-9.49.41-fix-setting-of-firewall-ZONE.patch b/SOURCES/initscripts-9.49.41-fix-setting-of-firewall-ZONE.patch new file mode 100644 index 0000000..167f0ff --- /dev/null +++ b/SOURCES/initscripts-9.49.41-fix-setting-of-firewall-ZONE.patch @@ -0,0 +1,70 @@ +From d951e7c7d64c0378424b8b2edd406ae9eaa73ec1 Mon Sep 17 00:00:00 2001 +From: "David Kaspar [Dee'Kej]" +Date: Wed, 6 Jun 2018 19:19:11 +0200 +Subject: [PATCH] network-scripts: setting of firewall ZONE fixed + + For currently unknown reason the dbus-send calls will fail to set the + firewall zone for the given interface if we omit the --print-reply + option... + + This looks like some kind of race-condition in dbus-send, since the + --print-reply makes the call synchronous and slower. + + Hopefully this is only a temporary workaround until DBus is fixed. + + Resolves: #1586284 +--- + sysconfig/network-scripts/ifdown-post | 4 ++-- + sysconfig/network-scripts/ifup-eth | 3 ++- + sysconfig/network-scripts/ifup-post | 4 ++-- + 3 files changed, 6 insertions(+), 5 deletions(-) + +diff --git a/sysconfig/network-scripts/ifdown-post b/sysconfig/network-scripts/ifdown-post +index 9db16ad3..48a57ae4 100755 +--- a/sysconfig/network-scripts/ifdown-post ++++ b/sysconfig/network-scripts/ifdown-post +@@ -53,9 +53,9 @@ if ! check_default_route ; then + fi + fi + +-# Reset firewall ZONE to "default": ++# Reset firewall zone (empty ZONE means default): + if [ "${REALDEVICE}" != "lo" ]; then +- dbus-send --system --dest=org.fedoraproject.FirewallD1 \ ++ dbus-send --print-reply --system --dest=org.fedoraproject.FirewallD1 \ + /org/fedoraproject/FirewallD1 \ + org.fedoraproject.FirewallD1.zone.removeInterface \ + string: "" string:"${DEVICE}" \ +diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth +index bee5c4f0..ab59244a 100755 +--- a/sysconfig/network-scripts/ifup-eth ++++ b/sysconfig/network-scripts/ifup-eth +@@ -339,7 +339,8 @@ fi + /etc/sysconfig/network-scripts/ifup-ipv6 ${CONFIG} + if is_true "${DHCPV6C}" && [ -x /sbin/dhclient ]; then + +- # Assign interface into a firewalld zone so we can obtain the IPv6 via DHCPv6: ++ # Assign interface into a firewalld zone so we can ++ # obtain the IPv6 via DHCPv6 (empty ZONE means default): + if [ "${REALDEVICE}" != "lo" ]; then + dbus-send --print-reply --system --dest=org.fedoraproject.FirewallD1 \ + /org/fedoraproject/FirewallD1 \ +diff --git a/sysconfig/network-scripts/ifup-post b/sysconfig/network-scripts/ifup-post +index c9d91700..c002503f 100755 +--- a/sysconfig/network-scripts/ifup-post ++++ b/sysconfig/network-scripts/ifup-post +@@ -132,9 +132,9 @@ if [ "$2" = "boot" -a \ + fi + fi + +-# Set firewall ZONE for this device (empty means default): ++# Set firewall ZONE for this device (empty ZONE means default): + if [ "${REALDEVICE}" != "lo" ]; then +- dbus-send --system --dest=org.fedoraproject.FirewallD1 \ ++ dbus-send --print-reply --system --dest=org.fedoraproject.FirewallD1 \ + /org/fedoraproject/FirewallD1 \ + org.fedoraproject.FirewallD1.zone.changeZoneOfInterface \ + string:"${ZONE}" string:"${DEVICE}" \ +-- +2.14.4 + diff --git a/SPECS/initscripts.spec b/SPECS/initscripts.spec index e96290a..2d42499 100644 --- a/SPECS/initscripts.spec +++ b/SPECS/initscripts.spec @@ -4,7 +4,7 @@ Version: 9.49.41 # ppp-watch is GPLv2+, everything else is GPLv2 License: GPLv2 and GPLv2+ Group: System Environment/Base -Release: 1%{?dist} +Release: 1%{?dist}.1 URL: https://github.com/fedora-sysv/initscripts Source: https://github.com/fedora-sysv/initscripts/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root @@ -36,6 +36,8 @@ Requires(preun): /sbin/chkconfig BuildRequires: glib2-devel popt-devel gettext pkgconfig systemd Provides: /sbin/service +Patch001: initscripts-9.49.41-fix-setting-of-firewall-ZONE.patch + %description The initscripts package contains basic system scripts used during a boot of the system. It also contains scripts which @@ -54,6 +56,7 @@ Currently, this consists of various memory checking code. %prep %setup -q +%patch001 -p1 %build make @@ -220,6 +223,9 @@ rm -rf $RPM_BUILD_ROOT /etc/profile.d/debug* %changelog +* Mon Jun 11 2018 David Kaspar [Dee'Kej] - 9.49.41-1.el7_5.1 +- network-scripts: setting of firewall ZONE fixed (bug #1588566) + * Tue Jan 02 2018 David Kaspar [Dee'Kej] - 9.49.41-1 - ifdown-post: fix logical error in commit 5d61564 - network-functions: use POSIX forwarding instead of bash-ism