File 1b8c1ce7-adapt-libssh2-api.patch of Package libvirt
xxxxxxxxxx
1
commit 1b8c1ce704788c08a764183aca74f3043d7733e4
2
Author: Michal Prívozník <mprivozn@redhat.com>
3
Date: Mon Jun 5 14:24:48 2023 +0200
4
5
virnetsshsession: Adapt to changed libssh2 API
6
7
In one of its commits [1] libssh2 changed the 'text' member of
8
LIBSSH2_USERAUTH_KBDINT_PROMPT struct from 'char' to 'unsigned
9
char'. But we g_strdup() the member in order to fill 'prompt'
10
member of virConnectCredential struct. Typecast the value to
11
avoid warnings. Also, drop @prompt variable, as it's needless.
12
13
1: https://github.com/libssh2/libssh2/commit/83853f8aea0e2f739cacd491632eb7fd3d03ad2d
14
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
15
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
16
17
Index: libvirt-7.1.0/src/rpc/virnetsshsession.c
18
===================================================================
19
--- libvirt-7.1.0.orig/src/rpc/virnetsshsession.c
20
+++ libvirt-7.1.0/src/rpc/virnetsshsession.c
21
22
23
/* fill data structures for auth callback */
24
for (i = 0; i < num_prompts; i++) {
25
- char *prompt;
26
- prompt = g_strdup(prompts[i].text);
27
- askcred[i].prompt = prompt;
28
+ askcred[i].prompt = g_strdup((char*)prompts[i].text);
29
30
/* remove colon and trailing spaces from prompts, as default behavior
31
* of libvirt's auth callback is to add them */
32