dom0: populate unchanged firewall settings with previous values (#589)
Missed settings in new firewall configuration caused exception. In old qubes-manager (before #582 done) this exception silently broke saving operation, leaving user with progress bar windows infinitely...
This commit is contained in:
parent
2c7227066c
commit
3f3dc4708c
@ -1164,6 +1164,11 @@ class QubesVm(object):
|
|||||||
shutil.rmtree (self.dir_path)
|
shutil.rmtree (self.dir_path)
|
||||||
|
|
||||||
def write_firewall_conf(self, conf):
|
def write_firewall_conf(self, conf):
|
||||||
|
defaults = self.get_firewall_conf()
|
||||||
|
for item in defaults.keys():
|
||||||
|
if item not in conf:
|
||||||
|
conf[item] = defaults[item]
|
||||||
|
|
||||||
root = xml.etree.ElementTree.Element(
|
root = xml.etree.ElementTree.Element(
|
||||||
"QubesFirwallRules",
|
"QubesFirwallRules",
|
||||||
policy = "allow" if conf["allow"] else "deny",
|
policy = "allow" if conf["allow"] else "deny",
|
||||||
|
Loading…
Reference in New Issue
Block a user