Skip to content

Commit

Permalink
winusb: run qrexec daemon for stubdomain
Browse files Browse the repository at this point in the history
if the corresponding feature (stubdom_qrexec) is enabled
  • Loading branch information
easydozen committed Jan 19, 2021
1 parent d3d6b9d commit b57e211
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions qubes/vm/qubesvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1211,6 +1211,9 @@ def start(self, start_guid=True, notify_function=None,
self.libvirt_domain.resume()

yield from self.start_qrexec_daemon()
if self.virt_mode == 'hvm' and \
self.features.check_with_template('stubdom_qrexec', False):
yield from self.start_qrexec_daemon(stubdom=True)

yield from self.fire_event_async('domain-start',
start_guid=start_guid)
Expand Down Expand Up @@ -1629,14 +1632,19 @@ def start_daemon(*command, input=None, **kwargs):
output=stdout, stderr=stderr)

@asyncio.coroutine
def start_qrexec_daemon(self):
def start_qrexec_daemon(self, stubdom=False):
"""Start qrexec daemon.
:raises OSError: when starting fails.
"""

self.log.debug('Starting the qrexec daemon')
qrexec_args = [str(self.xid), self.name, self.default_user]
if stubdom:
qrexec_args = [str(self.stubdom_xid), self.name + '-dm', \
self.default_user]
else:
qrexec_args = [str(self.xid), self.name, self.default_user]

if not self.debug:
qrexec_args.insert(0, "-q")

Expand Down

0 comments on commit b57e211

Please sign in to comment.