mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
virnetsshsession: Adapt to changed libssh2 API
In one of its commits [1] libssh2 changed the 'text' member of
LIBSSH2_USERAUTH_KBDINT_PROMPT struct from 'char' to 'unsigned
char'. But we g_strdup() the member in order to fill 'prompt'
member of virConnectCredential struct. Typecast the value to
avoid warnings. Also, drop @prompt variable, as it's needless.
1: 83853f8aea
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
794c583f46
commit
1b8c1ce704
@ -216,9 +216,7 @@ virNetSSHKbIntCb(const char *name G_GNUC_UNUSED,
|
||||
|
||||
/* fill data structures for auth callback */
|
||||
for (i = 0; i < num_prompts; i++) {
|
||||
char *prompt;
|
||||
prompt = g_strdup(prompts[i].text);
|
||||
askcred[i].prompt = prompt;
|
||||
askcred[i].prompt = g_strdup((char*)prompts[i].text);
|
||||
|
||||
/* remove colon and trailing spaces from prompts, as default behavior
|
||||
* of libvirt's auth callback is to add them */
|
||||
|
Loading…
Reference in New Issue
Block a user