]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
rpc: Fix virt-ssh-helper detection
authorAndrea Bolognani <abologna@redhat.com>
Mon, 26 Oct 2020 23:15:33 +0000 (00:15 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Tue, 27 Oct 2020 09:30:18 +0000 (10:30 +0100)
When trying to figure out whether virt-ssh-helper is available
on the remote host, we mistakenly look for the helper by the
name it had while the feature was being worked on instead of
the one that was ultimately picked, and thus end up using the
netcat fallback every single time.

Fixes: f8ec7c842df9e40c6607eae9b0223766cb226336
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/rpc/virnetclient.c

index c6591ecdfc13fe35d80af77231fd8a839027f401..2eabacd6e889abe847c0ae2fb8be613da1d424a3 100644 (file)
@@ -453,7 +453,7 @@ virNetClientSSHHelperCommand(virNetClientProxy proxy,
 
     switch (proxy) {
     case VIR_NET_CLIENT_PROXY_AUTO:
-        return g_strdup_printf("sh -c 'which virt-nc 1>/dev/null 2>&1; "
+        return g_strdup_printf("sh -c 'which virt-ssh-helper 1>/dev/null 2>&1; "
                                "if test $? = 0; then "
                                "    %s; "
                                "else"