<div dir="ltr">enclosed the patch from git repo</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 27, 2013 at 2:31 PM, David Maciejak <span dir="ltr"><<a href="mailto:david.maciejak@gmail.com" target="_blank">david.maciejak@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi,<br></div><div><div><br></div><div>I was discussing with Daniel about the best way to pass the ssh password when using such kind of uri: 'xen+libssh2://<a href="http://root@192.168.0.10?sshauth=password" target="_blank">root@192.168.0.10?sshauth=password</a>'</div>

<div><br></div><div>As it seems passing the password in the uri is not a good option, maybe we</div><div>can grab it from auth conf ? it seems it's not the case as now (tell me if i am wrong).</div><div><br></div><div>

So enclosed a patch to add this feature.</div><div><br></div><div>As you can see in virnetclient.c there is no virAuthGetPassword call, so</div><div>the authfile is never used.</div><div><br></div><div>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).</div>

<div><br></div><div>Once we have access to virConnectPtr, as you will see in the patch we</div><div>can check if authMethods is set to 'password' and grab the password from auth file by calling virAuthGetPassword.</div>

<div><br></div><div><br></div><div><br></div><div>regards,</div><div>david</div></div></div>
</blockquote></div><br></div>