From nobody Sat Nov 23 01:41:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1685969026; cv=none; d=zohomail.com; s=zohoarc; b=nepINwhEfB5vc3Ry53+8o53aF1ITymwnjIVLUzNi/t03oO95v/MDZ7x3zQo61bHTv46DT46SV0LFMEzTNjE68wCzP4jMKfd5W1juWAns5kPiAJHgm5+f98edYPX5Izqv7P3TIjVQZgj9NVjAv1XM5CyQPoeT+5+ooQyVTT/xXwk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685969026; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=ZFeQk12Eq1D+a7Q4fAdFWgh3LmYYnau1MvxOjOev6A0=; b=mN22pOkScscbZ3sn2kZHAIjj6oWdfX4iKFos3Af/AC+R7ge/xWSgqjIytcFn8rVi/SQ9ZBX4EwWtNk2KJRWIjedCdST8O/14cDIB4YWvEn0E1guNBi39P0Rs07+zzyjHYVigGQj2Zw8M+nPBsN34JgBKZ7GH0tQiU2RLdokj7Uc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1685969026171306.8129693356011; Mon, 5 Jun 2023 05:43:46 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-353-NxnQfBnvPpCpwNZjpnaG6Q-1; Mon, 05 Jun 2023 08:43:41 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 697BB85A5BB; Mon, 5 Jun 2023 12:43:39 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 41D5EC16044; Mon, 5 Jun 2023 12:43:37 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 1F09619465A0; Mon, 5 Jun 2023 12:43:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2DEF61946595 for ; Mon, 5 Jun 2023 12:43:36 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 1B9C9C16044; Mon, 5 Jun 2023 12:43:36 +0000 (UTC) Received: from localhost.localdomain (unknown [10.43.2.36]) by smtp.corp.redhat.com (Postfix) with ESMTP id B7991C1603B for ; Mon, 5 Jun 2023 12:43:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685969025; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=ZFeQk12Eq1D+a7Q4fAdFWgh3LmYYnau1MvxOjOev6A0=; b=C/iNjys0wIjDIk1gtSFPBr6BkSaYbV4Q0aFIties0prxTijuxSx940DtKOLBKXQFBOOrXK zk4vQwrgT5lG+VbFCbPRJIZISjaacHk3Jdoim88vzbq982gaWBuEZ6q830Ad2I6WuEh8dp 8L3lDtI1emKn+ksAYym55OoqtBFZ/W8= X-MC-Unique: NxnQfBnvPpCpwNZjpnaG6Q-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH] virnetsshsession: Adapt to changed libssh2 API Date: Mon, 5 Jun 2023 14:43:31 +0200 Message-Id: <65557a1b19b674e7c8b1eeee29255389783703f5.1685968921.git.mprivozn@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1685969026824100001 Content-Type: text/plain; charset="utf-8"; x-default="true" 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/83853f8aea0e2f739cacd491632eb7= fd3d03ad2d Signed-off-by: Michal Privoznik Reviewed-by: Peter Krempa --- Here's a somewhat green CI: https://gitlab.com/MichalPrivoznik/libvirt/-/pipelines/889599454 I mean, we still have failures on rawhide, but that's because numad was temporarily removed from repos, but they are bringing it back. So ignore that part. Apparently our CI images were not rebuilt this morning. 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 f84805825b..1df43bb044 100644 --- a/src/rpc/virnetsshsession.c +++ b/src/rpc/virnetsshsession.c @@ -216,9 +216,7 @@ virNetSSHKbIntCb(const char *name G_GNUC_UNUSED, =20 /* fill data structures for auth callback */ for (i =3D 0; i < num_prompts; i++) { - char *prompt; - prompt =3D g_strdup(prompts[i].text); - askcred[i].prompt =3D prompt; + askcred[i].prompt =3D g_strdup((char*)prompts[i].text); =20 /* remove colon and trailing spaces from prompts, as default behav= ior * of libvirt's auth callback is to add them */ --=20 2.39.3