On 5/15/26 14:19, Richard W.M. Jones wrote:
> On Fri, May 15, 2026 at 01:05:30PM +0200, Michal Privoznik via Devel wrote:
>> See 3/3 for in depth explanation.
>> After this, there's still one problem - the ssh transport (tcp+ssh://...)
>> because virNetSocketNewConnectSSH() does not really ask for
>> virConnectAuthCallbackPtr. There should be a way to fix it though: from
>> bash script parse URI and append ?no_tty=1 at the end of URI. This
>> directs virNetSocketNewConnectSSH() to execute SSH binary with
>> BatchMode=yes which is documented to suppress keyboard interaction.
>>
>> If we find this ^^ needed I can try to write a patch. But for now, let's
>> fix other transports.
>>
>> Michal Prívozník (3):
>>   virnetsshsession: Don't check for auth callbacks in
>>     virNetSSHAuthenticatePassword()
>>   virnetlibsshsession: Check later for auth callback in
>>     virNetLibsshAuthenticatePassword()
>>   virsh: Provide no auth callbacks for bash completer
>>
>>  src/rpc/virnetlibsshsession.c | 14 +++++++-------
>>  src/rpc/virnetsshsession.c    |  7 -------
>>  tools/virsh.c                 | 10 +++++++++-
>>  3 files changed, 16 insertions(+), 15 deletions(-)
> 
> I tested the series.  I had to use 'build/run bash' to set shell
> variables so that the virsh subcommand would use the patched version.

The bash completion script is written in such way that it should execute
ARGV[0]. So in fact all that's needed is:

cd build;
./tools/virsh -c esx://... <TAB><TAB>

> I also strace'd that bash so I could be doubly sure it was running the
> 'virsh complete' subcommand:
> 
>   2600499 execve("/home/rjones/d/libvirt/build/tools/virsh", ["virsh", "-q", 
> "-c", "esx://root@[redacted]"..., "complete", "--", ""], 0x561fdfcd7000 /* 80 
> vars */) = 0
> 
> Anyhow it fixes the issue I was having, so:
> 
> Tested-by: Richrad W.M. Jones <[email protected]>

Thanks for testing!

Michal

Reply via email to