"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/firewall/core/fw_config.py" between
firewalld-1.0.1.tar.gz and firewalld-1.0.2.tar.gz

About: firewalld provides a dynamically managed firewall with support for network/firewall zones to define the trust level of network connections or interfaces.

fw_config.py  (firewalld-1.0.1):fw_config.py  (firewalld-1.0.2)
skipping to change at line 987 skipping to change at line 987
if obj.builtin or not obj.default: if obj.builtin or not obj.default:
raise FirewallError(errors.BUILTIN_ZONE, raise FirewallError(errors.BUILTIN_ZONE,
"'%s' is built-in zone" % obj.name) "'%s' is built-in zone" % obj.name)
def remove_zone(self, obj): def remove_zone(self, obj):
self.check_builtin_zone(obj) self.check_builtin_zone(obj)
self._remove_zone(obj) self._remove_zone(obj)
def rename_zone(self, obj, name): def rename_zone(self, obj, name):
self.check_builtin_zone(obj) self.check_builtin_zone(obj)
new_zone = self._copy_zone(obj, name) obj_conf = obj.export_config_dict()
self._remove_zone(obj) self._remove_zone(obj)
try:
new_zone = self.new_zone_dict(name, obj_conf)
except:
# re-add original if rename failed
self.new_zone_dict(obj.name, obj_conf)
raise
return new_zone return new_zone
def _copy_zone(self, obj, name):
return self.new_zone_dict(name, obj.export_config_dict())
# policy objects # policy objects
def get_policy_objects(self): def get_policy_objects(self):
return sorted(set(list(self._policy_objects.keys()) + \ return sorted(set(list(self._policy_objects.keys()) + \
list(self._builtin_policy_objects.keys()))) list(self._builtin_policy_objects.keys())))
def add_policy_object(self, obj): def add_policy_object(self, obj):
if obj.builtin: if obj.builtin:
self._builtin_policy_objects[obj.name] = obj self._builtin_policy_objects[obj.name] = obj
else: else:
 End of changes. 3 change blocks. 
4 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)