rpc: Fix virt-ssh-helper detection

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: f8ec7c842d
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Andrea Bolognani 2020-10-27 00:15:33 +01:00
parent ea7af657f1
commit 7d959c302d

View 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"