Accepting request 402726 from security:netfilter
1 OBS-URL: https://build.opensuse.org/request/show/402726 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/firewalld?expand=0&rev=8
This commit is contained in:
commit
1d00795d88
@ -0,0 +1,72 @@
|
||||
From dbc30dd2dfee1b4b662aa997cee6a6cb59aa559f Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Woerner <twoerner@redhat.com>
|
||||
Date: Tue, 7 Jun 2016 16:19:20 +0200
|
||||
Subject: [PATCH] firewall.core.fw_nm: Hide NM typelib import, new
|
||||
nm_get_dbus_interface function
|
||||
|
||||
The typelib import of NM should not be added to __all__. The new function
|
||||
nm_get_dbus_interface has been added to be able to add a signal receiver for
|
||||
NetworkManager firewall-config and firewall-applet.
|
||||
|
||||
Fixes: #119
|
||||
---
|
||||
src/firewall-applet | 2 +-
|
||||
src/firewall-config | 2 +-
|
||||
src/firewall/core/fw_nm.py | 9 +++++++--
|
||||
3 files changed, 9 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/firewall-applet b/src/firewall-applet
|
||||
index a078df8..1cf4633 100755
|
||||
--- a/src/firewall-applet
|
||||
+++ b/src/firewall-applet
|
||||
@@ -550,7 +550,7 @@ class TrayApplet(QtGui.QSystemTrayIcon):
|
||||
if nm_is_imported():
|
||||
self.bus.add_signal_receiver(
|
||||
self.nm_signal_receiver,
|
||||
- dbus_interface=NM.DBUS_INTERFACE,
|
||||
+ dbus_interface=nm_get_dbus_interface(),
|
||||
signal_name='PropertiesChanged',
|
||||
member_keyword='member')
|
||||
self.nm_signal_receiver()
|
||||
diff --git a/src/firewall-config b/src/firewall-config
|
||||
index b69c69f..e25b058 100755
|
||||
--- a/src/firewall-config
|
||||
+++ b/src/firewall-config
|
||||
@@ -1250,7 +1250,7 @@ class FirewallConfig(object):
|
||||
if nm_is_imported():
|
||||
self.fw.bus.add_signal_receiver(
|
||||
self.nm_signal_receiver,
|
||||
- dbus_interface=NM.DBUS_INTERFACE,
|
||||
+ dbus_interface=nm_get_dbus_interface(),
|
||||
signal_name='PropertiesChanged',
|
||||
member_keyword='member')
|
||||
else:
|
||||
diff --git a/src/firewall/core/fw_nm.py b/src/firewall/core/fw_nm.py
|
||||
index 3df94c4..8a8043b 100644
|
||||
--- a/src/firewall/core/fw_nm.py
|
||||
+++ b/src/firewall/core/fw_nm.py
|
||||
@@ -21,10 +21,10 @@
|
||||
|
||||
"""Functions for NetworkManager interaction"""
|
||||
|
||||
-__all__ = [ "NM", "check_nm_imported", "nm_is_imported",
|
||||
+__all__ = [ "check_nm_imported", "nm_is_imported",
|
||||
"nm_get_zone_of_connection", "nm_set_zone_of_connection",
|
||||
"nm_get_connections", "nm_get_connection_of_interface",
|
||||
- "nm_get_bus_name" ]
|
||||
+ "nm_get_bus_name", "nm_get_dbus_interface" ]
|
||||
|
||||
import gi
|
||||
try:
|
||||
@@ -164,3 +164,8 @@ def nm_get_bus_name():
|
||||
except Exception as msg:
|
||||
log.debug2("Failed to get bus name of NetworkManager")
|
||||
return None
|
||||
+
|
||||
+def nm_get_dbus_interface():
|
||||
+ if not _nm_imported:
|
||||
+ return ""
|
||||
+ return NM.DBUS_INTERFACE
|
||||
--
|
||||
2.8.3
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 8 08:10:11 UTC 2016 - mchandras@suse.de
|
||||
|
||||
- Add upstream patch to prevent unconditional dependencies to the
|
||||
NetworkManager typelib (gh#t-woerner/firewalld#119)
|
||||
* 0003-firewall.core.fw_nm-Hide-NM-typelib-import-new-nm_ge.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 31 08:30:44 UTC 2016 - mchandras@suse.de
|
||||
|
||||
|
@ -30,6 +30,9 @@ Patch0: 0001-src-firewall-core-Drop-unneeded-python-shebangs.patch
|
||||
# PATCH-FIX-UPSTREAM: 0002-firewall-core-fw_ifcfg-Quickly-return-if-ifcfg-direc.patch
|
||||
# Do not access the ifcfg directory if it does not exist
|
||||
Patch1: 0002-firewall-core-fw_ifcfg-Quickly-return-if-ifcfg-direc.patch
|
||||
# PATCH-FIX-UPSTREAM: 0003-firewall.core.fw_nm-Hide-NM-typelib-import-new-nm_ge.patch
|
||||
# Hide unneeded NM dependencies
|
||||
Patch2: 0003-firewall.core.fw_nm-Hide-NM-typelib-import-new-nm_ge.patch
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: docbook-xsl-stylesheets
|
||||
BuildRequires: gettext
|
||||
@ -92,6 +95,7 @@ firewalld.
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
%configure --enable-sysconfig --enable-rpmmacros
|
||||
|
Loading…
Reference in New Issue
Block a user