Blame SOURCES/firewalld-0.3.9-RHBZ#1075675.patch

06cdf6
diff -up firewalld-0.3.9/doc/xml/firewall-cmd.xml.RHBZ#1075675 firewalld-0.3.9/doc/xml/firewall-cmd.xml
06cdf6
--- firewalld-0.3.9/doc/xml/firewall-cmd.xml.RHBZ#1075675	2014-09-29 23:58:44.996603066 +0200
06cdf6
+++ firewalld-0.3.9/doc/xml/firewall-cmd.xml	2014-09-29 23:58:45.063603299 +0200
06cdf6
@@ -291,7 +291,7 @@
06cdf6
 	</varlistentry>
06cdf6
 
06cdf6
 	<varlistentry>
06cdf6
-          <term><option>--permanent</option> <option>--zone</option>=<replaceable>zone</replaceable> <option>--get-target</option></term>
06cdf6
+          <term><option>--permanent</option> <optional><option>--zone</option>=<replaceable>zone</replaceable></optional> <option>--get-target</option></term>
06cdf6
           <listitem>
06cdf6
             <para>
06cdf6
               Get the target of a permanent zone.
06cdf6
@@ -300,10 +300,10 @@
06cdf6
 	</varlistentry>
06cdf6
 
06cdf6
 	<varlistentry>
06cdf6
-          <term><option>--permanent</option> <option>--zone</option>=<replaceable>zone</replaceable> <option>--set-target</option>=<replaceable>zone</replaceable></term>
06cdf6
+          <term><option>--permanent</option> <optional><option>--zone</option>=<replaceable>zone</replaceable></optional> <option>--set-target</option>=<replaceable>target</replaceable></term>
06cdf6
           <listitem>
06cdf6
             <para>
06cdf6
-              Set the target of a permanent zone.
06cdf6
+              Set the target of a permanent zone. <replaceable>target</replaceable> is one of: <literal>default</literal>, <literal>ACCEPT</literal>, <literal>DROP</literal>, <literal>%%REJECT%%</literal>
06cdf6
             </para>
06cdf6
           </listitem>
06cdf6
 	</varlistentry>
06cdf6
diff -up firewalld-0.3.9/src/firewall/client.py.RHBZ#1075675 firewalld-0.3.9/src/firewall/client.py
06cdf6
--- firewalld-0.3.9/src/firewall/client.py.RHBZ#1075675	2014-09-29 23:58:44.981603013 +0200
06cdf6
+++ firewalld-0.3.9/src/firewall/client.py	2014-09-30 00:01:45.611233601 +0200
06cdf6
@@ -112,10 +112,10 @@ class FirewallClientZoneSettings(object)
06cdf6
 
06cdf6
     @handle_exceptions
06cdf6
     def getTarget(self):
06cdf6
-        return self.settings[4]
06cdf6
+        return self.settings[4] if self.settings[4] != DEFAULT_ZONE_TARGET else "default"
06cdf6
     @handle_exceptions
06cdf6
     def setTarget(self, target):
06cdf6
-        self.settings[4] = target
06cdf6
+        self.settings[4] = target if target != "default" else DEFAULT_ZONE_TARGET
06cdf6
 
06cdf6
     @handle_exceptions
06cdf6
     def getServices(self):
06cdf6
diff -up firewalld-0.3.9/src/firewall-cmd.RHBZ#1075675 firewalld-0.3.9/src/firewall-cmd
06cdf6
--- firewalld-0.3.9/src/firewall-cmd.RHBZ#1075675	2014-09-29 23:58:44.997603069 +0200
06cdf6
+++ firewalld-0.3.9/src/firewall-cmd	2014-09-30 00:06:46.901286444 +0200
06cdf6
@@ -92,9 +92,9 @@ Zone Options
06cdf6
   --delete-zone=<zone> Delete an existing zone [P only]
06cdf6
   --zone=<zone>        Use this zone to set or query options, else default zone
06cdf6
                        Usable for options maked with [Z]
06cdf6
-  --get-target         Get the zone target [P only]
06cdf6
+  --get-target         Get the zone target [P] [Z]
06cdf6
   --set-target=<target>
06cdf6
-                       Set the zone target [P only]
06cdf6
+                       Set the zone target [P] [Z]
06cdf6
 
06cdf6
 IcmpType Options
06cdf6
   --new-icmptype=<icmptype>
06cdf6
@@ -591,6 +591,9 @@ options_direct = a.passthrough or \
06cdf6
            a.add_passthrough or a.remove_passthrough or a.query_passthrough or \
06cdf6
            a.get_passthroughs or a.get_all_passthroughs
06cdf6
 
06cdf6
+options_require_permanent = options_permanent_only \
06cdf6
+                            or a.get_target or a.set_target
06cdf6
+
06cdf6
 # these are supposed to only write out some output
06cdf6
 options_list_get = a.help or a.version or a.list_all or a.list_all_zones or \
06cdf6
  a.list_lockdown_whitelist_commands or a.list_lockdown_whitelist_contexts or \
06cdf6
@@ -599,7 +602,7 @@ options_list_get = a.help or a.version o
06cdf6
  or a.list_rich_rules or a.list_interfaces or a.list_sources or \
06cdf6
  a.get_default_zone or a.get_active_zones or a.get_zone_of_interface or \
06cdf6
  a.get_zone_of_source or a.get_zones or a.get_services or a.get_icmptypes or \
06cdf6
- a.get_target or a.set_target
06cdf6
+ a.get_target
06cdf6
 
06cdf6
 # Check various impossible combinations of options
06cdf6
 
06cdf6
@@ -615,7 +618,7 @@ if options_standalone and (options_zone
06cdf6
 
06cdf6
 if (options_direct or options_permanent_only) and (options_zone):
06cdf6
     __fail(parser.format_usage() +
06cdf6
-           "Can't use 'direct' options with other options.")
06cdf6
+           "Can't be used with --zone.")
06cdf6
 
06cdf6
 if (a.direct and not options_direct) or \
06cdf6
         (options_direct and not a.direct):
06cdf6
@@ -626,7 +629,7 @@ if options_permanent_only and not a.perm
06cdf6
     __fail(parser.format_usage() +
06cdf6
            "Option can be used only with --permanent.")
06cdf6
 
06cdf6
-if a.set_target and not a.permanent:
06cdf6
+if options_require_permanent and not a.permanent:
06cdf6
     __fail(parser.format_usage() +
06cdf6
            "Option can be used only with --permanent.")
06cdf6