core-admin-client/qubesadmin/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 tools: fix error reporing on unknown storage pool 2018-04-12 23:19:34 +02:00
dochelpers.py Fixes for pylint 2.0 2018-07-16 02:25:25 +02:00
qubes_prefs.py tools: drop --delete and --unset aliases for --default option 2017-08-12 22:33:36 +02:00
qvm_backup_restore.py qvm-backup-restore: also handle absent --ignore-missing 2018-02-26 04:10:05 +00:00
qvm_backup.py tools: suppress full traceback in console tools 2018-03-18 21:38:49 +01:00
qvm_check.py Fixes for pylint 2.0 2018-07-16 02:25:25 +02:00
qvm_clone.py tools: suppress full traceback in console tools 2018-03-18 21:38:49 +01:00
qvm_create.py tools/qvm-create: fix handling invalid label 2018-10-18 03:24:24 +02:00
qvm_device.py qvm-device/block: Alias '--ro' to '--option read-only=yes' 2018-01-10 19:30:30 +00:00
qvm_features.py tools: suppress full traceback in console tools 2018-03-18 21:38:49 +01:00
qvm_firewall.py tools/qvm-firewall: improve manpage and --help output 2018-05-03 01:03:35 +02:00
qvm_kill.py Rename qubesmgmt to qubesadmin module 2017-05-11 23:40:03 +02:00
qvm_ls.py qvm-ls: add filtering by domain power state 2018-10-10 20:06:35 +02:00
qvm_pause.py Rename qubesmgmt to qubesadmin module 2017-05-11 23:40:03 +02:00
qvm_pool.py tools/qvm-pool: add --set to modify pool properties 2018-04-13 00:26:25 +02:00
qvm_prefs.py Fixes for pylint 2.0 2018-07-16 02:25:25 +02:00
qvm_remove.py Better information on error in qvm-remove 2018-07-20 00:21:47 +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 tools: clarify qvm-service --help 2018-10-29 05:27:05 +01:00
qvm_shutdown.py tools: suppress full traceback in console tools 2018-03-18 21:38:49 +01:00
qvm_start_gui.py Merge branch 'windows-tools' 2018-07-16 22:06:44 +02:00
qvm_start.py tools/qvm-start: add naive waiting for cdrom device 2018-01-12 05:27:57 +01:00
qvm_tags.py tools: suppress full traceback in console tools 2018-03-18 21:38:49 +01:00
qvm_template_postprocess.py tools: don't fail qvm-template-postprocess on shutdown race condition 2018-06-27 02:24:03 +02:00
qvm_unpause.py Rename qubesmgmt to qubesadmin module 2017-05-11 23:40:03 +02:00
qvm_volume.py qvm-volume: refuse to shrink volume unless --force option is used 2018-03-20 17:53:36 +01:00