From 8806aeab5c9addc95fd03beee0e346a0d3503ea1 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Sat, 16 Mar 2013 16:13:15 +0100 Subject: [PATCH] QubesNetVm: use xs module, not xenstore-* command --- dom0/core-modules/005QubesNetVm.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/dom0/core-modules/005QubesNetVm.py b/dom0/core-modules/005QubesNetVm.py index 9b4fdcf8..34250699 100644 --- a/dom0/core-modules/005QubesNetVm.py +++ b/dom0/core-modules/005QubesNetVm.py @@ -113,17 +113,13 @@ class QubesNetVm(QubesVm): if xid < 0: return - command = [ - "/usr/bin/xenstore-chmod", - "/local/domain/{0}/qubes-netvm-external-ip".format(xid) - ] + perms = [ { 'dom': xid } ] - command.append("n{0}".format(xid)) + for xid in self.__external_ip_allowed_xids: + perms.append({ 'dom': xid, 'read': True }) - for id in self.__external_ip_allowed_xids: - command.append("r{0}".format(id)) - - return subprocess.check_call(command) + xs.set_permissions('', '/local/domain/{0}/qubes-netvm-external-ip'.format(xid), + perms) def start(self, **kwargs): if dry_run: