app: fix QubesRemote.run_service

When no localcmd is given, it should only affect last argument(s) of
qrexec-client-vm call, not the whole command.
This commit is contained in:
Marek Marczykowski-Górecki 2017-04-28 23:21:31 +02:00
parent b8a8394d2d
commit 2efe8405b7
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -399,6 +399,6 @@ class QubesRemote(QubesBase):
kwargs.setdefault('stdout', subprocess.PIPE)
kwargs.setdefault('stderr', subprocess.PIPE)
proc = subprocess.Popen([qubesmgmt.config.QREXEC_CLIENT_VM,
dest, service] + shlex.split(localcmd) if localcmd else [],
dest or '', service] + (shlex.split(localcmd) if localcmd else []),
**kwargs)
return proc