dom0/core: implement per-VM-type firewall defaults
This commit is contained in:
parent
8023c66020
commit
01e8a2dff9
@ -1223,8 +1223,11 @@ class QubesVm(object):
|
|||||||
def has_firewall(self):
|
def has_firewall(self):
|
||||||
return os.path.exists (self.firewall_conf)
|
return os.path.exists (self.firewall_conf)
|
||||||
|
|
||||||
|
def get_firewall_defaults(self):
|
||||||
|
return { "rules": list(), "allow": True, "allowDns": True, "allowIcmp": True, "allowYumProxy": False }
|
||||||
|
|
||||||
def get_firewall_conf(self):
|
def get_firewall_conf(self):
|
||||||
conf = { "rules": list(), "allow": True, "allowDns": True, "allowIcmp": True, "allowYumProxy": False }
|
conf = self.get_firewall_defaults()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
tree = xml.etree.ElementTree.parse(self.firewall_conf)
|
tree = xml.etree.ElementTree.parse(self.firewall_conf)
|
||||||
|
Loading…
Reference in New Issue
Block a user