core-admin-client/qubesadmin/tests
Marek Marczykowski-Górecki 9acce13a35
tools: fix qvm-run --pass-io --localcmd=... vmname command
qubes.VMShell service, used by qvm-run, expects the command on the first
input line. Previously, when --localcmd was used, the command wasn't
written anywhere and the local command was connected directly to
qubes.VMShell service. And the first line of its output was interpreted
as a command.

Fix this by starting the local command separately, after sending the
command to qubes.VMShell service.

While at it, unify handling shell command and service calls in the process.
vm.run_service(..., localcmd= ) isn't that useful in general case,
because for qubes.VMShell the caller first need to send the command
before starting local process. Since the qvm-run tool needs to implement
manual starting localcmd anyway, don't use localcmd= run_service's
argument at all to unify calling methods.

There is slight behavior change: previously localcmd was started only
after establishing service connection (for example only if qrexec policy
allows), now it is started in all the cases.

Fixes QubesOS/qubes-issues#4040
2018-12-08 00:44:02 +01:00
..
backup tests: dom0 backup restore, both v3 and v4 2018-02-14 04:28:23 +01:00
tools tools: fix qvm-run --pass-io --localcmd=... vmname command 2018-12-08 00:44:02 +01:00
vm Merge remote-tracking branch 'qubesos/pr/51' 2018-01-15 03:23:54 +01:00
__init__.py tests/tools: extend vm.run_service() mockup 2018-12-07 04:25:00 +01:00
app.py Copy application menu on VM clone 2018-10-29 05:27:05 +01:00
devices.py devices: drop DeviceInfo.options 2018-09-18 21:54:51 +02:00
errors.py Improve QubesDaemonNoResponseError error message 2017-08-12 15:15:52 +02:00
events.py events: deserialize DeviceInfo class in device-* events 2018-09-27 14:52:53 +02:00
features.py features: serialize True as '1' 2017-07-28 13:56:05 +02:00
firewall.py firewall: drop GetPolicy/SetPolicy calls 2017-07-05 14:16:30 +02:00
label.py base: make WrapperObjectsCollection behave like a dict 2018-01-12 05:29:40 +01:00
storage.py base: make WrapperObjectsCollection behave like a dict 2018-01-12 05:29:40 +01:00
tags.py tags support 2017-06-20 01:34:16 +02:00
utils.py Name change of vm dependencies helper function 2018-07-19 21:24:28 +02:00