|
|
06cdf6 |
diff -up firewalld-0.3.9/src/firewall/core/fw_zone.py.RHBZ#993650_add2 firewalld-0.3.9/src/firewall/core/fw_zone.py
|
|
|
06cdf6 |
--- firewalld-0.3.9/src/firewall/core/fw_zone.py.RHBZ#993650_add2 2015-01-13 17:37:22.250118707 +0100
|
|
|
06cdf6 |
+++ firewalld-0.3.9/src/firewall/core/fw_zone.py 2015-01-13 17:37:22.319118393 +0100
|
|
|
06cdf6 |
@@ -364,6 +364,21 @@ class FirewallZone:
|
|
|
06cdf6 |
if len(obj.interfaces) == 0 and len(obj.sources) == 0:
|
|
|
06cdf6 |
self.unapply_zone_settings(zone)
|
|
|
06cdf6 |
|
|
|
06cdf6 |
+ def get_config_with_settings(self, zone):
|
|
|
06cdf6 |
+ """
|
|
|
06cdf6 |
+ :return: exported config updated with runtime settings
|
|
|
06cdf6 |
+ """
|
|
|
06cdf6 |
+ config = self.get_zone(zone).export_config()
|
|
|
06cdf6 |
+ config = config[:5] + (self.list_services(zone),
|
|
|
06cdf6 |
+ self.list_ports(zone),
|
|
|
06cdf6 |
+ self.list_icmp_blocks(zone),
|
|
|
06cdf6 |
+ self.query_masquerade(zone),
|
|
|
06cdf6 |
+ self.list_forward_ports(zone),
|
|
|
06cdf6 |
+ self.list_interfaces(zone),
|
|
|
06cdf6 |
+ self.list_sources(zone),
|
|
|
06cdf6 |
+ self.list_rules(zone))
|
|
|
06cdf6 |
+ return config
|
|
|
06cdf6 |
+
|
|
|
06cdf6 |
# handle chains, modules and rules for a zone
|
|
|
06cdf6 |
def handle_cmr(self, zone, chains, modules, rules, enable):
|
|
|
06cdf6 |
cleanup_chains = None
|
|
|
06cdf6 |
diff -up firewalld-0.3.9/src/firewall/server/firewalld.py.RHBZ#993650_add2 firewalld-0.3.9/src/firewall/server/firewalld.py
|
|
|
06cdf6 |
--- firewalld-0.3.9/src/firewall/server/firewalld.py.RHBZ#993650_add2 2015-01-13 17:37:22.320118388 +0100
|
|
|
06cdf6 |
+++ firewalld-0.3.9/src/firewall/server/firewalld.py 2015-01-13 17:38:26.464825878 +0100
|
|
|
06cdf6 |
@@ -731,7 +731,7 @@ class FirewallD(slip.dbus.service.Object
|
|
|
06cdf6 |
# returns zone settings for zone
|
|
|
06cdf6 |
zone = dbus_to_python(zone)
|
|
|
06cdf6 |
log.debug1("getZoneSettings(%s)", zone)
|
|
|
06cdf6 |
- return self.fw.zone.get_zone(zone).export_config()
|
|
|
06cdf6 |
+ return self.fw.zone.get_config_with_settings(zone)
|
|
|
06cdf6 |
|
|
|
06cdf6 |
@slip.dbus.polkit.require_auth(PK_ACTION_INFO)
|
|
|
06cdf6 |
@dbus_service_method(DBUS_INTERFACE, in_signature='',
|