代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/libvirt 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From a2588d430c3dea3c4c259adc9d54d48891712c42 Mon Sep 17 00:00:00 2001
From: mayunlong <mayunlong6@huawei.com>
Date: Wed, 9 Aug 2023 21:11:41 +0800
Subject: [PATCH] virnetsshsession: Adapt to change 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: https://github.com/libssh2/libssh2/commit/83853f8aea0e2f739cacd491632eb7fd3d03ad2d
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
---
src/rpc/virnetsshsession.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/rpc/virnetsshsession.c b/src/rpc/virnetsshsession.c
index fabdc3ef22..e073f6dbf7 100644
--- a/src/rpc/virnetsshsession.c
+++ b/src/rpc/virnetsshsession.c
@@ -230,9 +230,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 */
--
2.41.0.windows.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。