libvirt/src/remote
Daniel P. Berrangé dfad1b551d remote: introduce virt-ssh-helper binary
When accessing libvirtd over a SSH tunnel, the remote driver needs a way
to proxy the SSH input/output stream to a suitable libvirt daemon. This
is currently done by spawning netcat, pointing it to the libvirtd socket
path. This is problematic for a number of reasons:

 - The socket path varies according to the --prefix chosen at build
   time. The remote client is seeing the local prefix, but what we
   need is the remote prefix

 - The socket path varies according to remote env variables, such as
   the XDG_RUNTIME_DIR location. Again we see the local XDG_RUNTIME_DIR
   value, but what we need is the remote value (if any)

 - The remote driver doesn't know whether it must connect to the legacy
   libvirtd or the modular daemons, so must always assume legacy
   libvirtd for back-compat. This means we'll always end up using the
   virtproxyd daemon adding an extra hop in the RPC layer.

 - We can not able to autospawn the libvirtd daemon for session mode
   access

To address these problems this patch introduces the 'virtd-ssh-helper'
program which takes the URI for the remote driver as a CLI parameter.
It then figures out which daemon to connect to and its socket path,
using the same code that the remote driver client would on the remote
host's build of libvirt.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-09-09 16:46:22 +01:00
..
libvirtd-admin.socket.in systemd: honour $runstatedir in socket unit files 2019-08-27 10:23:05 +01:00
libvirtd-ro.socket.in systemd: honour $runstatedir in socket unit files 2019-08-27 10:23:05 +01:00
libvirtd-tcp.socket.in remote: conditionalize systemd socket unit files 2019-08-09 14:06:31 +01:00
libvirtd-tls.socket.in remote: conditionalize systemd socket unit files 2019-08-09 14:06:31 +01:00
libvirtd.aug.in src: fix word spell typos 2020-07-09 10:01:41 +02:00
libvirtd.conf.in remote: use SocketMode=0600 when polkit is not compiled 2020-09-03 11:13:25 +01:00
libvirtd.confd configure: Provide OpenRC scripts for sub-daemons 2019-12-16 10:11:22 +01:00
libvirtd.init.in remote: Drop KRB5_KTNAME override 2020-04-03 11:51:00 +02:00
libvirtd.libxl.logrotate.in logging: ensure virtlogd rollover takes priority over logrotate 2019-07-12 12:44:59 +01:00
libvirtd.logrotate.in daemon: move logrotate files to src/remote/ 2018-02-22 12:26:57 +00:00
libvirtd.lxc.logrotate.in logging: ensure virtlogd rollover takes priority over logrotate 2019-07-12 12:44:59 +01:00
libvirtd.policy Do not generate polkit rules file 2018-03-14 12:46:26 +01:00
libvirtd.qemu.logrotate.in logging: ensure virtlogd rollover takes priority over logrotate 2019-07-12 12:44:59 +01:00
libvirtd.rules daemon: move misc libvirtd policy files to src/remote/ 2018-02-22 12:26:50 +00:00
libvirtd.sasl remote: Drop KRB5_KTNAME override 2020-04-03 11:51:00 +02:00
libvirtd.service.in systemd: start libvirtd after firewalld/iptables services 2020-05-05 20:16:02 -04:00
libvirtd.socket.in remote: use SocketMode=0600 when polkit is not compiled 2020-09-03 11:13:25 +01:00
libvirtd.sysconf remote: Drop KRB5_KTNAME override 2020-04-03 11:51:00 +02:00
libvirtd.sysctl daemon: move misc libvirtd policy files to src/remote/ 2018-02-22 12:26:50 +00:00
lxc_protocol.x Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
meson.build remote: introduce virt-ssh-helper binary 2020-09-09 16:46:22 +01:00
qemu_protocol.x src: convert all code to use virsocket.h 2020-01-29 14:51:40 +00:00
remote_daemon_config.c src: Fix boolean assignment 2020-05-05 13:08:57 +02:00
remote_daemon_config.h remote: conditionalize IP socket usage in libvirtd daemon 2019-08-09 14:06:31 +01:00
remote_daemon_dispatch.c Move debug statements after declarations 2020-08-25 19:03:11 +02:00
remote_daemon_dispatch.h src/remote: use #pragma once in headers 2019-06-19 17:12:30 +02:00
remote_daemon_stream.c Move debug statements after declarations 2020-08-25 19:03:11 +02:00
remote_daemon_stream.h src/remote: use #pragma once in headers 2019-06-19 17:12:30 +02:00
remote_daemon.c rpc: finish all threads before exiting main loop 2020-09-07 09:33:59 +03:00
remote_daemon.h remote: open secondary drivers via remote driver if needed 2019-08-09 14:06:31 +01:00
remote_driver.c remote: extract logic for determining daemon to connect to 2020-09-09 16:46:22 +01:00
remote_driver.h remote: enable connecting to the per-driver daemons 2019-08-09 14:06:31 +01:00
remote_protocol.x rpc: gendispatch: trim Flags from the return struct name 2020-02-05 17:12:59 +01:00
remote_sockets.c remote: extract logic for determining daemon to connect to 2020-09-09 16:46:22 +01:00
remote_sockets.h remote: extract logic for determining daemon to connect to 2020-09-09 16:46:22 +01:00
remote_ssh_helper.c remote: introduce virt-ssh-helper binary 2020-09-09 16:46:22 +01:00
test_libvirtd.aug.in remote: adapt augeas test case for dynamic polkit config change 2020-09-03 16:37:17 +01:00
virt-guest-shutdown.target meson: src: generate systemd unit files for libvirt daemons 2020-08-03 09:27:05 +02:00
virtproxyd.confd configure: Provide OpenRC scripts for sub-daemons 2019-12-16 10:11:22 +01:00
virtproxyd.init.in remote: Drop KRB5_KTNAME override 2020-04-03 11:51:00 +02:00
virtproxyd.service.in systemd: Move timeout from service files to sysconf files 2020-04-03 11:50:50 +02:00
virtproxyd.sysconf systemd: Move timeout from service files to sysconf files 2020-04-03 11:50:50 +02:00