Blob Blame History Raw
commit b67a186b32f832656eefb604b9460f1df5c37a56
Author: Thomas Woerner <twoerner@redhat.com>
Date:   Mon Aug 22 10:24:19 2016 +0200

    firewall-cmd: Fixed --{get,set}-{description,short} for permanent zones
    
    The --{get,set}-{description,short} options for permanent zones have been
    missing the settings initiation line, which resulted in a trace back later
    while using the settings.
    
    This fixes RHBZ#1368625

diff --git a/src/firewall-cmd b/src/firewall-cmd
index 81b4b73..e6bd2e1 100755
--- a/src/firewall-cmd
+++ b/src/firewall-cmd
@@ -1775,20 +1775,24 @@ if a.permanent:
 
         # set zone description
         elif a.set_description:
+            settings = fw.config().getZoneByName(zone)
             settings.setDescription(a.set_description)
             fw_zone.update(settings)
 
         # get zone description
         elif a.get_description:
+            settings = fw.config().getZoneByName(zone)
             cmd.print_and_exit(settings.getDescription())
 
         # set zone short description
         elif a.set_short:
+            settings = fw.config().getZoneByName(zone)
             settings.setShort(a.set_short)
             fw_zone.update(settings)
 
         # get zone short description
         elif a.get_short:
+            settings = fw.config().getZoneByName(zone)
             cmd.print_and_exit(settings.getShort())
 
 elif a.version: