core: fix QubesVm.clone_attrs - really copy dicts
Otherwise it would point at the same object and for example changing vm.services[] in one VM will change that also for another. That link will be severed after reloading the VMs from qubes.xml, but at least in case of DispVM startup its too late - vm.service['qubes-dvm'] is set for the DispVM template even during normal startup, not savefile preparation.
This commit is contained in:
parent
d776400973
commit
913cc27023
@ -1210,7 +1210,10 @@ class QubesVm(object):
|
||||
self._do_not_reset_firewall = True
|
||||
for prop in self.get_clone_attrs():
|
||||
try:
|
||||
setattr(self, prop, getattr(src_vm, prop))
|
||||
val = getattr(src_vm, prop)
|
||||
if isinstance(val, dict):
|
||||
val = val.copy()
|
||||
setattr(self, prop, val)
|
||||
except Exception as e:
|
||||
if fail_on_error:
|
||||
self._do_not_reset_firewall = False
|
||||
|
Loading…
Reference in New Issue
Block a user