[libvirt] [PATCH] add support for libssh2 password from auth file

David Maciejak david.maciejak at gmail.com
Fri Jun 28 09:52:25 UTC 2013


enclosed the patch from git repo


On Thu, Jun 27, 2013 at 2:31 PM, David Maciejak <david.maciejak at gmail.com>wrote:

> Hi,
>
> I was discussing with Daniel about the best way to pass the ssh password
> when using such kind of uri: 'xen+libssh2://
> root at 192.168.0.10?sshauth=password'
>
> As it seems passing the password in the uri is not a good option, maybe we
> can grab it from auth conf ? it seems it's not the case as now (tell me if
> i am wrong).
>
> So enclosed a patch to add this feature.
>
> As you can see in virnetclient.c there is no virAuthGetPassword call, so
> the authfile is never used.
>
> The patch enclosed is modifying the function prototype to add
> virConnectPtr parameter (so remote_driver.c virNetClientNewLibSSH2 call has
> to be updated too and the corresponding .h too).
>
> Once we have access to virConnectPtr, as you will see in the patch we
> can check if authMethods is set to 'password' and grab the password from
> auth file by calling virAuthGetPassword.
>
>
>
> regards,
> david
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130628/040ed75d/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: virnetclient.patch
Type: application/octet-stream
Size: 3538 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130628/040ed75d/attachment-0001.obj>


More information about the libvir-list mailing list