On 23.05.2013 00:26, Eric Blake wrote:
On 05/20/2013 11:55 AM, Michal Privoznik wrote:
> ---
> src/rpc/gendispatch.pl | 21 ++++--------
> src/rpc/virnetclient.c | 16 ++++-----
> src/rpc/virnetmessage.c | 27 +++++++++------
> src/rpc/virnetsaslcontext.c | 6 ++--
> src/rpc/virnetserver.c | 6 ++--
> src/rpc/virnetserverclient.c | 10 ++----
> src/rpc/virnetservermdns.c | 6 ++--
> src/rpc/virnetsocket.c | 10 +++---
> src/rpc/virnetsshsession.c | 78 +++++++++++++++++++++-----------------------
> src/rpc/virnettlscontext.c | 26 +++++++--------
> 10 files changed, 92 insertions(+), 114 deletions(-)
>
ACK.
Since 04/13 got NACKed, I needed to squash this in before pushing.
diff --git a/src/rpc/virnetsshsession.c b/src/rpc/virnetsshsession.c
index c28a395..b6aedc8 100644
--- a/src/rpc/virnetsshsession.c
+++ b/src/rpc/virnetsshsession.c
@@ -234,10 +234,12 @@ virNetSSHKbIntCb(const char *name ATTRIBUTE_UNUSED,
/* fill data structures for auth callback */
for (i = 0; i < num_prompts; i++) {
- if (VIR_STRDUP(askcred[i].prompt, prompts[i].text) < 0) {
+ char *prompt;
+ if (VIR_STRDUP(prompt, prompts[i].text) < 0) {
priv->authCbErr = VIR_NET_SSH_AUTHCB_OOM;
goto cleanup;
}
+ askcred[i].prompt = prompt;
/* remove colon and trailing spaces from prompts, as default
behavior
* of libvirt's auth callback is to add them */
Michal