core-admin-client/qubesadmin/tests/tools
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
..
__init__.py
init.py
qubes_prefs.py
qvm_backup_restore.py
qvm_backup.py qvm-backup: let backup core handle default VM selection 2018-02-23 02:09:06 +00:00
qvm_check.py
qvm_clone.py
qvm_create.py Copy application menu on VM clone 2018-10-29 05:27:05 +01:00
qvm_device.py
qvm_features.py
qvm_firewall.py tools/qvm-firewall: add dst4 and dst6 as synonyms for dsthost 2018-05-03 00:49:43 +02:00
qvm_kill.py
qvm_ls.py qvm-ls: add filtering by domain power state 2018-10-10 20:06:35 +02:00
qvm_pause.py
qvm_pool.py tools/qvm-pool: add --set to modify pool properties 2018-04-13 00:26:25 +02:00
qvm_prefs.py Add test of qvm_prefs for specal case "None" 2018-06-13 23:38:25 -05:00
qvm_remove.py Added test for qvm-remove dependency reporting 2018-07-20 01:35:00 +02:00
qvm_run.py tools: fix qvm-run --pass-io --localcmd=... vmname command 2018-12-08 00:44:02 +01:00
qvm_service.py
qvm_shutdown.py
qvm_start_gui.py Add 'gui-emulated' feature 2018-07-16 04:25:56 +02:00
qvm_start.py
qvm_tags.py
qvm_template_postprocess.py qvm-template-postprocess: resize volume only when needed 2018-03-19 20:47:15 +01:00
qvm_unpause.py
qvm_volume.py qvm-volume: refuse to shrink volume unless --force option is used 2018-03-20 17:53:36 +01:00