From nobody Mon May 6 08:01:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1561102311; cv=none; d=zoho.com; s=zohoarc; b=UiY219mLi37WJ42HHwjTkq3VW593WjlS8b6L09gLUTROutyBCj257MVXk5OvWhIRMGv7g3lg4L44TJPuBDUsErTO72Ki3B232ZuJI3wkZy+yaHNBM7ffpbvE7AB/z4XFtRpSF8kvDWDaLXyHlcVsE47+al1GLEfnceNK9lEmugU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561102311; 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:ARC-Authentication-Results; bh=7eVPL1bl3jBLJzz6tUSBhWVjAPT27daIK3BNl/yEq98=; b=DDIel/FpJNTe+uU8cN9Ht81zzJuDcbxw1GCdRFxrGv9Zh+hgJBbqRUwELp2Rp9iHHBhaCUN0KJECiuJfDS2OLuannlV2ZeM6DY+4y1Y1P1qgOzzLRwqxNeUQaK2abvsZxDwfi+D6v18AIt5XMziVduf3i6sjy34OJjmn5YMsSjQ= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 156110231169549.944060126330214; Fri, 21 Jun 2019 00:31:51 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 49049C057E29; Fri, 21 Jun 2019 07:31:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 978FC1001B32; Fri, 21 Jun 2019 07:31:09 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C8C70206D2; Fri, 21 Jun 2019 07:30:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5L7Uehp010155 for ; Fri, 21 Jun 2019 03:30:40 -0400 Received: by smtp.corp.redhat.com (Postfix) id 473255C224; Fri, 21 Jun 2019 07:30:40 +0000 (UTC) Received: from antique-laptop.redhat.com (ovpn-200-39.brq.redhat.com [10.40.200.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8E4CF5C221 for ; Fri, 21 Jun 2019 07:30:37 +0000 (UTC) From: Pavel Hrdina To: libvir-list@redhat.com Date: Fri, 21 Jun 2019 09:30:36 +0200 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] rpc: virnetlibsshsession: update deprecated functions X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 21 Jun 2019 07:31:50 +0000 (UTC) Content-Type: text/plain; charset="utf-8" In libssh 0.9.0 functions ssh_is_server_known and ssh_write_knownhost are marked as deprecated. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D1722735 Signed-off-by: Pavel Hrdina Reviewed-by: Jiri Denemark --- m4/virt-libssh.m4 | 8 ++++++++ src/rpc/virnetlibsshsession.c | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/m4/virt-libssh.m4 b/m4/virt-libssh.m4 index 01c3b75c72..132447da16 100644 --- a/m4/virt-libssh.m4 +++ b/m4/virt-libssh.m4 @@ -33,6 +33,14 @@ AC_DEFUN([LIBVIRT_CHECK_LIBSSH],[ [], [AC_DEFINE_UNQUOTED([ssh_get_server_publickey], [ssh_get_publickey], [ssh_get_publickey is deprecated and replaced by ssh_get_serve= r_publickey.])]) + AC_CHECK_FUNC([ssh_session_is_known_server], + [], + [AC_DEFINE_UNQUOTED([ssh_session_is_known_server], [ssh_is_server_kn= own], + [ssh_is_server_known is deprecated and replaced by ssh_session= _is_known_server.])]) + AC_CHECK_FUNC([ssh_session_update_known_hosts], + [], + [AC_DEFINE_UNQUOTED([ssh_session_update_known_hosts], [ssh_write_kno= wnhost], + [ssh_write_knownhost is deprecated and replaced by ssh_session= _update_known_hosts.])]) CFLAGS=3D"$old_CFLAGS" LIBS=3D"$old_LIBS" fi diff --git a/src/rpc/virnetlibsshsession.c b/src/rpc/virnetlibsshsession.c index 486437e7bf..093ac29071 100644 --- a/src/rpc/virnetlibsshsession.c +++ b/src/rpc/virnetlibsshsession.c @@ -284,7 +284,7 @@ virNetLibsshCheckHostKey(virNetLibsshSessionPtr sess) if (sess->hostKeyVerify =3D=3D VIR_NET_LIBSSH_HOSTKEY_VERIFY_IGNORE) return 0; =20 - state =3D ssh_is_server_known(sess->session); + state =3D ssh_session_is_known_server(sess->session); =20 switch (state) { case SSH_SERVER_KNOWN_OK: @@ -378,7 +378,7 @@ virNetLibsshCheckHostKey(virNetLibsshSessionPtr sess) =20 /* write the host key file, if specified */ if (sess->knownHostsFile) { - if (ssh_write_knownhost(sess->session) < 0) { + if (ssh_session_update_known_hosts(sess->session) < 0) { errmsg =3D ssh_get_error(sess->session); virReportError(VIR_ERR_LIBSSH, _("failed to write known_host file '%s': %s= "), --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list