|
|
843f86 |
From 8ec42cd1041ba342c9f87f51b62f80be278f682b Mon Sep 17 00:00:00 2001
|
|
|
843f86 |
From: Eric Garver <e@erig.me>
|
|
|
843f86 |
Date: Tue, 21 Nov 2017 16:04:23 -0500
|
|
|
843f86 |
Subject: [PATCH] firewalld: also reload dbus config interface for global
|
|
|
843f86 |
options
|
|
|
843f86 |
|
|
|
843f86 |
These options require the firewall to be reloaded, but it was not also
|
|
|
843f86 |
reloading the dbus config interface. The interface objects would end up
|
|
|
843f86 |
pointing to stale cleanup()'d config objects (via firewall.core.fw
|
|
|
843f86 |
reload()). Therefore we also need to reload/refresh the config
|
|
|
843f86 |
interface.
|
|
|
843f86 |
|
|
|
843f86 |
Fixes: rhbz 1514043
|
|
|
843f86 |
---
|
|
|
843f86 |
src/firewall/core/fw.py | 6 ------
|
|
|
843f86 |
src/firewall/server/firewalld.py | 8 ++++++++
|
|
|
843f86 |
2 files changed, 8 insertions(+), 6 deletions(-)
|
|
|
843f86 |
|
|
|
843f86 |
diff --git a/src/firewall/core/fw.py b/src/firewall/core/fw.py
|
|
|
843f86 |
index 0dda11d49116..2a119b1dc4d4 100644
|
|
|
843f86 |
--- a/src/firewall/core/fw.py
|
|
|
843f86 |
+++ b/src/firewall/core/fw.py
|
|
|
843f86 |
@@ -1142,9 +1142,6 @@ class Firewall(object):
|
|
|
843f86 |
self._log_denied = value
|
|
|
843f86 |
self._firewalld_conf.set("LogDenied", value)
|
|
|
843f86 |
self._firewalld_conf.write()
|
|
|
843f86 |
-
|
|
|
843f86 |
- # now reload the firewall
|
|
|
843f86 |
- self.reload()
|
|
|
843f86 |
else:
|
|
|
843f86 |
raise FirewallError(errors.ALREADY_SET, value)
|
|
|
843f86 |
|
|
|
843f86 |
@@ -1163,9 +1160,6 @@ class Firewall(object):
|
|
|
843f86 |
self._automatic_helpers = value
|
|
|
843f86 |
self._firewalld_conf.set("AutomaticHelpers", value)
|
|
|
843f86 |
self._firewalld_conf.write()
|
|
|
843f86 |
-
|
|
|
843f86 |
- # now reload the firewall
|
|
|
843f86 |
- self.reload()
|
|
|
843f86 |
else:
|
|
|
843f86 |
raise FirewallError(errors.ALREADY_SET, value)
|
|
|
843f86 |
|
|
|
843f86 |
diff --git a/src/firewall/server/firewalld.py b/src/firewall/server/firewalld.py
|
|
|
843f86 |
index 9c5d463de793..fc7422f12261 100644
|
|
|
843f86 |
--- a/src/firewall/server/firewalld.py
|
|
|
843f86 |
+++ b/src/firewall/server/firewalld.py
|
|
|
843f86 |
@@ -939,6 +939,10 @@ class FirewallD(slip.dbus.service.Object):
|
|
|
843f86 |
self.accessCheck(sender)
|
|
|
843f86 |
self.fw.set_log_denied(value)
|
|
|
843f86 |
self.LogDeniedChanged(value)
|
|
|
843f86 |
+ # must reload the firewall as well
|
|
|
843f86 |
+ self.fw.reload()
|
|
|
843f86 |
+ self.config.reload()
|
|
|
843f86 |
+ self.Reloaded()
|
|
|
843f86 |
|
|
|
843f86 |
@dbus.service.signal(config.dbus.DBUS_INTERFACE, signature='s')
|
|
|
843f86 |
@dbus_handle_exceptions
|
|
|
843f86 |
@@ -969,6 +973,10 @@ class FirewallD(slip.dbus.service.Object):
|
|
|
843f86 |
self.accessCheck(sender)
|
|
|
843f86 |
self.fw.set_automatic_helpers(value)
|
|
|
843f86 |
self.AutomaticHelpersChanged(value)
|
|
|
843f86 |
+ # must reload the firewall as well
|
|
|
843f86 |
+ self.fw.reload()
|
|
|
843f86 |
+ self.config.reload()
|
|
|
843f86 |
+ self.Reloaded()
|
|
|
843f86 |
|
|
|
843f86 |
@dbus.service.signal(config.dbus.DBUS_INTERFACE, signature='s')
|
|
|
843f86 |
@dbus_handle_exceptions
|
|
|
843f86 |
--
|
|
|
843f86 |
2.12.0
|
|
|
843f86 |
|