[libvirt] [PATCH] virsh: fix password auth failed on ssh connection

Ján Tomko jtomko at redhat.com
Tue Aug 26 15:09:03 UTC 2014


On 08/26/2014 07:25 AM, Seyeong Kim wrote:
> When try to connect to another host using virsh with password auth on ssh env,
> can't put password properly because it's waiting IO from STDIN.
> 
> This patch check if it's in pts so make that doesn't poll from STDIN.
> ---
>  tools/virsh-domain.c |  3 +++
>  tools/virsh.c        | 11 +++++++++++
>  tools/virsh.h        |  2 ++
>  3 files changed, 16 insertions(+)
> 
> diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
> index 2562326..b079261 100644
> --- a/tools/virsh-domain.c
> +++ b/tools/virsh-domain.c
> @@ -3698,6 +3698,9 @@ vshWatchJob(vshControl *ctl,
>      /* don't poll on STDIN if we are not using a terminal */
>      if (!vshTTYAvailable(ctl))
>          npollfd = 1;
> +    /* don't poll on STDIN if we are using a pseudo terminal slave */
> +    if (vshPTSAvailable(ctl))
> +        npollfd = 1;

So we'd only poll stdin on non-pts ttys, should we bother polling on stdin at
all then?

What is the actual command that fails?

Also, there was a recent change in this area:

commit 7eabd5503e3de147b703c1a1e6dff81cdc46d1e7
    cmdMigrate: move vshConnect before vshWatchJob

Does it fail with or without it too?

Jan


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140826/020fb9f8/attachment-0001.sig>


More information about the libvir-list mailing list