varlink: add "ssh:" transport
authorLennart Poettering <lennart@poettering.net>
Mon, 8 Jan 2024 21:26:17 +0000 (22:26 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 8 Jan 2024 22:24:45 +0000 (23:24 +0100)
commita1bb30de7f5d9c4f7f01061240d984a786d5d00c
treef2105b8c3a009b0ca051d512480776a2fc9d70eb
parent07dca3c4b013bf9de440436142986408b4a3537d
varlink: add "ssh:" transport

This uses openssh 9.4's -W support for AF_UNIX. Unfortunately older versions
don't work with this, and I couldn#t figure a way that would work for
older versions too, would not be racy and where we'd still could keep
track of the forked off ssh process.

Unfortunately, on older versions -W will just hang (because it tries to
resolve the AF_UNIX path as regular host name), which sucks, but hopefully this
issue will go away sooner or later on its own, as distributions update.

Fedora is still stuck at 9.3 at the time of posting this (even on
Fedora), even though 9.4, 9.5, 9.6 have all already been released by
now.

Example:
        varlinkctl call -j ssh:root@somehost:/run/systemd/io.systemd.Credentials io.systemd.Credentials.Encrypt '{"text":"foobar"}'
docs/ENVIRONMENT.md
man/varlinkctl.xml
src/shared/varlink.c
test/TEST-74-AUX-UTILS/test.sh
test/units/testsuite-74.varlinkctl.sh