From nobody Wed Apr 24 01:11:27 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; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 154298534275461.761193349573546; Fri, 23 Nov 2018 07:02:22 -0800 (PST) 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 01CA1308624F; Fri, 23 Nov 2018 15:02:16 +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 32AA61001F54; Fri, 23 Nov 2018 15:02:14 +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 630AF3F7CD; Fri, 23 Nov 2018 15:02:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wANF2A1N002044 for ; Fri, 23 Nov 2018 10:02:10 -0500 Received: by smtp.corp.redhat.com (Postfix) id A44BF1054FD8; Fri, 23 Nov 2018 15:02:10 +0000 (UTC) Received: from mx1.redhat.com (ext-mx17.extmail.prod.ext.phx2.redhat.com [10.5.110.46]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9CBDC1001F54 for ; Fri, 23 Nov 2018 15:02:10 +0000 (UTC) Received: from mail-qt1-f196.google.com (mail-qt1-f196.google.com [209.85.160.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ACBC33002C65 for ; Fri, 23 Nov 2018 15:02:04 +0000 (UTC) Received: by mail-qt1-f196.google.com with SMTP id l11so10781822qtp.0 for ; Fri, 23 Nov 2018 07:02:04 -0800 (PST) Received: from localhost.localdomain ([191.8.59.166]) by smtp.gmail.com with ESMTPSA id k185sm23772370qkd.62.2018.11.23.07.02.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Nov 2018 07:02:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=GnR5fdnsoSvfsHb24DD6hWV40dutnq1qswMUIsSqhpE=; b=Od2lWg7esgTDkZxR+YlYH13mssQtEv5iu4vPP13Dnk2Nc6x82Y6rWSoO7pOhD/IiIf 8ijwq9rDcsuusDq4MTzME3ho2k+aE2pGnYxciIDyzVbEQvtZXrWOdZkaR8MmbK4D+7ao U27TBUl1LXZ/Dcz8yCcZytbNtXrrIIq6W/3IauE8owbRFX0GlQ1Zac5I6hwhiTJLuZgV ybIPJ7hcEZmftBCUwQXHnp289hVa0bamHzo2f5+AnxjFL8Ck8xxYxLjJaw3wm2/2VHVb dutuFod42KNpKpnECpp70xr9aOM3K2RR4KC/3+urS4+CD2h5XiezwiPwUmBHplQo0F8+ cjlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GnR5fdnsoSvfsHb24DD6hWV40dutnq1qswMUIsSqhpE=; b=krzBmpJvLtMbldNXNErtikV9ZfVfLiMtK6BRNnBEfM9oISgHzZEIhmUW+MrxmTbuD9 nLOFzwbmYZ5P3oDfxV7bTjwE/yVV7suezhAelPd0h1W4+PSoVq6J/yLkd/F/aMIgHy2g 5mA8x1UkwjT6/ireJWGaqYvJZJrcV6FFGW7zKJq0Kevv1nuzeMudBbBsMV4vyL7OSw8s rQlgQgpogKehXxXVS5ssM6w7fMFJTDTmfYRm9IurlibdvmHT3wdZyRgRNoMT/2ILHoxI VHhQg5+eDCJJ3jyJFkKdTpR1vJnO3f60BsIyO6JiaauFt9vlOkXzrfQCvyMSGdFgEAyX EBrg== X-Gm-Message-State: AA+aEWYqMI3CpFoUkMw0Nz/pwBpSvoKNw2a0Vxhejcvasgi2y5zBVPD8 PMUv2k5DMKDYk8TFKx+7fANRNYzT X-Google-Smtp-Source: AFSGD/UkxA86AvN7rLx9KkarLtsP5Nj8eBwlPYxGjnMBokjlQdrk+ASo3yGyorztz6OrWd23UxeIJQ== X-Received: by 2002:a0c:edcb:: with SMTP id i11mr14787559qvr.95.1542985323708; Fri, 23 Nov 2018 07:02:03 -0800 (PST) From: Julio Faracco To: libvir-list@redhat.com Date: Fri, 23 Nov 2018 23:01:51 +0800 Message-Id: <20181123150154.28335-2-jcfaracco@gmail.com> In-Reply-To: <20181123150154.28335-1-jcfaracco@gmail.com> References: <20181123150154.28335-1-jcfaracco@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Fri, 23 Nov 2018 15:02:04 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Fri, 23 Nov 2018 15:02:04 +0000 (UTC) for IP:'209.85.160.196' DOMAIN:'mail-qt1-f196.google.com' HELO:'mail-qt1-f196.google.com' FROM:'jcfaracco@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.108 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 209.85.160.196 mail-qt1-f196.google.com 209.85.160.196 mail-qt1-f196.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.46 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 1/4] m4: checking if ssh_session_is_known_server() exists. 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.49]); Fri, 23 Nov 2018 15:02:16 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" This commit adds some checks inside libssh m4 checking to verify if ssh_session_is_known_server function is available. This new function scope replaces the old ssh_is_server_known() from libssh 0.8.0 and below versions. Another auxiliar enumerator was added to keep the compatibility with the old standard used by ssh_is_server_known() function. Signed-off-by: Julio Faracco --- m4/virt-libssh.m4 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/m4/virt-libssh.m4 b/m4/virt-libssh.m4 index 01c3b75c72..6eac84cfe7 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_TYPE([enum ssh_known_hosts_e], + [AC_DEFINE([HAVE_SSH_KNOWN_HOSTS_E], [1], + [Defined if enum ssh_known_hosts_e exists in libssh.h])], + [], [[#include ]]) CFLAGS=3D"$old_CFLAGS" LIBS=3D"$old_LIBS" fi --=20 2.19.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed Apr 24 01:11:27 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; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1542985350482168.94929676424977; Fri, 23 Nov 2018 07:02:30 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A0D76307EA95; Fri, 23 Nov 2018 15:02:25 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 70BD618BA9; Fri, 23 Nov 2018 15:02:25 +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 2DF34181B9E5; Fri, 23 Nov 2018 15:02:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wANF2CEQ002050 for ; Fri, 23 Nov 2018 10:02:12 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2ECBF140FE; Fri, 23 Nov 2018 15:02:12 +0000 (UTC) Received: from mx1.redhat.com (ext-mx14.extmail.prod.ext.phx2.redhat.com [10.5.110.43]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2616818FAA for ; Fri, 23 Nov 2018 15:02:08 +0000 (UTC) Received: from mail-qt1-f195.google.com (mail-qt1-f195.google.com [209.85.160.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7986E309708F for ; Fri, 23 Nov 2018 15:02:06 +0000 (UTC) Received: by mail-qt1-f195.google.com with SMTP id i7so10753234qtj.10 for ; Fri, 23 Nov 2018 07:02:06 -0800 (PST) Received: from localhost.localdomain ([191.8.59.166]) by smtp.gmail.com with ESMTPSA id k185sm23772370qkd.62.2018.11.23.07.02.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Nov 2018 07:02:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=6piU7/QMUk6E518lkagV2+UYqApzKbmTpmuKv+b++dg=; b=LDPKZ5qKzNFJYJW/yJwejotu9ZyE9PpleApyhjfZoVUDkMPKkaIlK3rPGYwVMMkHUY 9BIDvM+Zy6zHJnsqAjlrHkI3iBbBRcdkA6QIXFm5MfQCTXs2plhhfmr4qhrkd7RECoFF qxHfgJdAfoHLyLnYxCdlYWrEKr8bBOZcILWI5jn/mL9ODyGai9XNnOP4DpHJywTEInN8 6uw9AvFhlkZJteczUGpyINeq3ITVB8y3tpMELpZc474lwRvmBAo0ln+5f9kTXWfQmB6M 35EIkmd/PE4+KRPk8DaTF+hJiZB6Z9GI/Nd0TKyAQDrC0IANYQlJz8DxW2j8BYALjWrE wUiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6piU7/QMUk6E518lkagV2+UYqApzKbmTpmuKv+b++dg=; b=OH8JRCvhyTgFG2n/rDZjAD68x5UBCOUrhdC0mim/FE0rnQja0xnMnVTJO0kpzxrRY2 6kyHjh1uwSDoBQLC2OrYiOFOuihUUbXJvGnCU0RF59NAHN+9rI0mK3z1v2nCVcu8U6pl V6OyKvkkGGRPUnP+7dbho7EqPBW/412hEGc9hue6zrFkCswAcSfpuctLH/DFyggHNyyN cBVbA7WH03WMisEgAHj/rbgpoMUMPwjsudTdsXd/IYX4hZftaAsS00sv6+UN7Ou8j5xV X86qPL6dDGDisGrnML+DLuAiReCJdpEZe3frQZVb6TIatmcE6jbHdD4LltvLBMjqPa+A bwRw== X-Gm-Message-State: AGRZ1gI59FxQ8/F2iTzZTf6yZghz1iwrMJ9p11bepMxfvsO/onzsaaq/ r+3uNU/ZkIEeWeZUSxhc0jI5+GTB X-Google-Smtp-Source: AJdET5doncR3MXl4qh2XzcEeHLO9DKytewJiOmpgoMPafJqYKCUHti5jGEZxK4C+P94nGhLTvPJLoA== X-Received: by 2002:aed:3eac:: with SMTP id n41mr14696188qtf.196.1542985325433; Fri, 23 Nov 2018 07:02:05 -0800 (PST) From: Julio Faracco To: libvir-list@redhat.com Date: Fri, 23 Nov 2018 23:01:52 +0800 Message-Id: <20181123150154.28335-3-jcfaracco@gmail.com> In-Reply-To: <20181123150154.28335-1-jcfaracco@gmail.com> References: <20181123150154.28335-1-jcfaracco@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Fri, 23 Nov 2018 15:02:06 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Fri, 23 Nov 2018 15:02:06 +0000 (UTC) for IP:'209.85.160.195' DOMAIN:'mail-qt1-f195.google.com' HELO:'mail-qt1-f195.google.com' FROM:'jcfaracco@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.108 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 209.85.160.195 mail-qt1-f195.google.com 209.85.160.195 mail-qt1-f195.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.43 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 2/4] rpc: replacing ssh_is_server_known() by ssh_session_is_known_server(). 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.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Fri, 23 Nov 2018 15:02:26 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" After version 0.8.0, libssh deprecated the function scope ssh_is_server_known() and moved to ssh_session_is_known_server(). So, libvirt is failing to compile using this new function name. Signed-off-by: Julio Faracco --- src/rpc/virnetlibsshsession.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/src/rpc/virnetlibsshsession.c b/src/rpc/virnetlibsshsession.c index 7c5f158f4d..2252bf2975 100644 --- a/src/rpc/virnetlibsshsession.c +++ b/src/rpc/virnetlibsshsession.c @@ -80,6 +80,21 @@ struct _virNetLibsshAuthMethod { int tries; }; =20 +#ifndef HAVE_SSH_KNOWN_HOSTS_E +/* This is an auxiliar enum to help libssh migration to version 0.8.0 + * or higher. This enum associates the enumerator ssh_server_known_e + * with new ssh_known_hosts_e enum. In other words, it can be removed + * in the future. */ +enum _vir_ssh_known_hosts_e { + SSH_KNOWN_HOSTS_ERROR=3DSSH_SERVER_ERROR, + SSH_KNOWN_HOSTS_UNKNOWN=3DSSH_SERVER_NOT_KNOWN, + SSH_KNOWN_HOSTS_OK, + SSH_KNOWN_HOSTS_CHANGED, + SSH_KNOWN_HOSTS_OTHER, + SSH_KNOWN_HOSTS_NOT_FOUND, +}; +#endif + struct _virNetLibsshSession { virObjectLockable parent; virNetLibsshSessionState state; @@ -287,15 +302,15 @@ 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: + case SSH_KNOWN_HOSTS_OK: /* host key matches */ return 0; =20 - case SSH_SERVER_FOUND_OTHER: - case SSH_SERVER_KNOWN_CHANGED: + case SSH_KNOWN_HOSTS_OTHER: + case SSH_KNOWN_HOSTS_CHANGED: keyhashstr =3D virLibsshServerKeyAsString(sess); if (!keyhashstr) return -1; @@ -312,8 +327,8 @@ virNetLibsshCheckHostKey(virNetLibsshSessionPtr sess) ssh_string_free_char(keyhashstr); return -1; =20 - case SSH_SERVER_FILE_NOT_FOUND: - case SSH_SERVER_NOT_KNOWN: + case SSH_KNOWN_HOSTS_NOT_FOUND: + case SSH_KNOWN_HOSTS_UNKNOWN: /* key was not found, query to add it to database */ if (sess->hostKeyVerify =3D=3D VIR_NET_LIBSSH_HOSTKEY_VERIFY_NORMA= L) { virConnectCredential askKey; @@ -393,7 +408,7 @@ virNetLibsshCheckHostKey(virNetLibsshSessionPtr sess) /* key was accepted and added */ return 0; =20 - case SSH_SERVER_ERROR: + case SSH_KNOWN_HOSTS_ERROR: errmsg =3D ssh_get_error(sess->session); virReportError(VIR_ERR_LIBSSH, _("failed to validate SSH host key: %s"), --=20 2.19.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed Apr 24 01:11:27 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; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 154298534375933.667533445583445; Fri, 23 Nov 2018 07:02:23 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ECBDD3082A20; Fri, 23 Nov 2018 15:02:15 +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 748B42AAB2; Fri, 23 Nov 2018 15:02:15 +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 24E3B3F7D0; Fri, 23 Nov 2018 15:02:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wANF2C2K002051 for ; Fri, 23 Nov 2018 10:02:12 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2F49617A91; Fri, 23 Nov 2018 15:02:12 +0000 (UTC) Received: from mx1.redhat.com (ext-mx14.extmail.prod.ext.phx2.redhat.com [10.5.110.43]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2623867642 for ; Fri, 23 Nov 2018 15:02:08 +0000 (UTC) Received: from mail-qt1-f195.google.com (mail-qt1-f195.google.com [209.85.160.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E8CE3300B914 for ; Fri, 23 Nov 2018 15:02:07 +0000 (UTC) Received: by mail-qt1-f195.google.com with SMTP id e5so10757392qtr.12 for ; Fri, 23 Nov 2018 07:02:07 -0800 (PST) Received: from localhost.localdomain ([191.8.59.166]) by smtp.gmail.com with ESMTPSA id k185sm23772370qkd.62.2018.11.23.07.02.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Nov 2018 07:02:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=QgeP7JsAoSjVufucMPPKxqbp+CdlHdxR72tXD8woxw0=; b=Dac82SCS3GvRQJBGMtS47bjJpHsbjihuMX8p/k/NW7uLw+NE1maryQ6lopAbvaF+mu nEAJ4j1jiTs64aVzvsDvBFoL6taDD7ahqay4jYHMQq+znTeEiAKusNyhkBqc+Xlz3sYw T0faNlxvy4EyzfwisYwiWATdbtdlYNgZ0wdBcZZ/hBbdfiH/XN6idRq+1vNDseKtZg/K ykdUuwBurR3Svl/RRbZ+zq6LLbeW+OdSWUBu6Fn0S+VSPi0emYrAroU2FHqVYIk0675z r9nCXBRqJJf2R7n/Qzbdusx8mgFmQwGHNpjHYzkPtKKn34HiemkUKfRCBnuyeXNFo7SE SpVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QgeP7JsAoSjVufucMPPKxqbp+CdlHdxR72tXD8woxw0=; b=D2geldBOfM+qvedi+My9sm1CQc4XvKS83UnAf8aLAKMllSypTyb4YfJBNaFuk6aeYa CMe28awHgiMvPB0SnGcgMIek7ucZJsNg84p1hP2CQAhwR9awyKVFucUOj9StIVgxpv9h i8uQI2u6eEFDUVk6FnjK4mr2IU7VABZishrqrGwe5t/ntnR91deC4QXXG1Y572VcB4dG vp40ZdP0/5qaQ42kNK1wzzkzmfvOVJPrOmHrDTyCGiLfwd/QCdjBNThk3saKpeoBZ/JY +jeLJ3zR3aq8EZllFFw6R0GsmjqIhZ/o12WoUU6jLudLLa5gMW1kMRcg+yBwQ3O0OQXH bnWg== X-Gm-Message-State: AGRZ1gKBeL+8Lw3Extc2rB9vEBD+y2gTjZBOMd7bpFOCym14bVoTl/ND x6Afpr6GW2wA9dxZP4w+WKzQzCl0 X-Google-Smtp-Source: AJdET5fzR316sPqgiht5KkTHt28aU1Kfy0wqqTVuVxQfkBGRxhljmWCAjP9b6AJxqavtmOQNhwytXg== X-Received: by 2002:ac8:1ab8:: with SMTP id x53mr14588916qtj.44.1542985326860; Fri, 23 Nov 2018 07:02:06 -0800 (PST) From: Julio Faracco To: libvir-list@redhat.com Date: Fri, 23 Nov 2018 23:01:53 +0800 Message-Id: <20181123150154.28335-4-jcfaracco@gmail.com> In-Reply-To: <20181123150154.28335-1-jcfaracco@gmail.com> References: <20181123150154.28335-1-jcfaracco@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Fri, 23 Nov 2018 15:02:08 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Fri, 23 Nov 2018 15:02:08 +0000 (UTC) for IP:'209.85.160.195' DOMAIN:'mail-qt1-f195.google.com' HELO:'mail-qt1-f195.google.com' FROM:'jcfaracco@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.108 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 209.85.160.195 mail-qt1-f195.google.com 209.85.160.195 mail-qt1-f195.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.43 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 3/4] m4: checking if ssh_session_update_known_hosts() exists. 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.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Fri, 23 Nov 2018 15:02:16 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" This commit adds some checks inside libssh m4 checking to verify if ssh_session_update_known_hosts function is available. This new function scope replaces the old ssh_write_knownhost() from libssh 0.8.0 and below versions. Signed-off-by: Julio Faracco --- m4/virt-libssh.m4 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/m4/virt-libssh.m4 b/m4/virt-libssh.m4 index 6eac84cfe7..f2a5aed3cc 100644 --- a/m4/virt-libssh.m4 +++ b/m4/virt-libssh.m4 @@ -41,6 +41,10 @@ AC_DEFUN([LIBVIRT_CHECK_LIBSSH],[ [AC_DEFINE([HAVE_SSH_KNOWN_HOSTS_E], [1], [Defined if enum ssh_known_hosts_e exists in libssh.h])], [], [[#include ]]) + 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 --=20 2.19.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed Apr 24 01:11:27 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; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1542985357582465.24668472600706; Fri, 23 Nov 2018 07:02:37 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 10E003078A33; Fri, 23 Nov 2018 15:02:33 +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 CA49983EB8; Fri, 23 Nov 2018 15:02:32 +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 848EA3F605; Fri, 23 Nov 2018 15:02:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wANF2FoQ002083 for ; Fri, 23 Nov 2018 10:02:15 -0500 Received: by smtp.corp.redhat.com (Postfix) id 64A985D77D; Fri, 23 Nov 2018 15:02:15 +0000 (UTC) Received: from mx1.redhat.com (ext-mx09.extmail.prod.ext.phx2.redhat.com [10.5.110.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5D1815D763 for ; Fri, 23 Nov 2018 15:02:10 +0000 (UTC) Received: from mail-qt1-f195.google.com (mail-qt1-f195.google.com [209.85.160.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8E822A404C for ; Fri, 23 Nov 2018 15:02:09 +0000 (UTC) Received: by mail-qt1-f195.google.com with SMTP id z16so10743727qtq.4 for ; Fri, 23 Nov 2018 07:02:09 -0800 (PST) Received: from localhost.localdomain ([191.8.59.166]) by smtp.gmail.com with ESMTPSA id k185sm23772370qkd.62.2018.11.23.07.02.07 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Nov 2018 07:02:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=CQ1ZwkrBEi8SmB3FGueuVWljzcUGQRwwtnV1iXuEZJ8=; b=qlAFpIwiKhogs58PQroea+jP108wIvF1q5LSmV3gEBK1u6sFpo+fRH06KPYwz/7hNI ljSYdhVy19ww0upjoNSbaflGza9hz4W1l2FeQP6eJ64tM8dCZME2lDxo9SIKJyTl9RuP k84HkilDx8+zF4bCgu5YmJANvGHUkTbBMH5muZrMO9ETFYuZlOAB+Siw0xA6n0opFyGj tYq2CdwUcYhWB+kN4L0lggGmZfLlfWcR1QPG2JvQWIv4zDSza0HSPb6WwSliub9JemnI 4gm0zT4nDP+DqVxqiIgjcTwO2VJbp9LWv4LA+pRfAIh7XYujVRFFmsZU738u5IP7sMLG ipqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CQ1ZwkrBEi8SmB3FGueuVWljzcUGQRwwtnV1iXuEZJ8=; b=J08rlhCxVFlFByCQkhiN3VW7WK0HhA8P/laHfBpvrNDGMPqQgOkOLrjh3KBz2hbVjK 4hbalh9q6+9IDtTvcii7KiQq4FkQSwSiiN516MZ9ZSlLF7/7Fb2TCisf1ppfLfvbDN5z MvgxBXv3M1ugeJfyic2CfmzAifK/qZZtTrfCdTRnRKYcYOHfWUDL1S26ZH5Kl3Qtk7g7 nTehz3uA78zg67FwRuARjVjFFlZum9T1dnjno3tA89ZM2VkjyPUI2/ExFAapvX7CLLXm uCJPIloM8j73qBQs9mP3Jx5L5uJ1JLt4kpDBmSAR80J+15gyowObHfm3hOedNub4A9Z2 /XXw== X-Gm-Message-State: AGRZ1gLlppzx2sKKl4oFmec8rOl/+abhL0IdhcMMAmwUZXXBKgzwu4H5 Qv31OFlMrPeRN4S0OelsaW74oEJX X-Google-Smtp-Source: AJdET5e+eMTczfvRlNEcFTiSFJHQxg8aIWoQyj2xVSIrJhTB6o1wI9bL/DraMrgkjl0XtOKxZSTiMw== X-Received: by 2002:ac8:3518:: with SMTP id y24mr14619958qtb.241.1542985328475; Fri, 23 Nov 2018 07:02:08 -0800 (PST) From: Julio Faracco To: libvir-list@redhat.com Date: Fri, 23 Nov 2018 23:01:54 +0800 Message-Id: <20181123150154.28335-5-jcfaracco@gmail.com> In-Reply-To: <20181123150154.28335-1-jcfaracco@gmail.com> References: <20181123150154.28335-1-jcfaracco@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 23 Nov 2018 15:02:09 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 23 Nov 2018 15:02:09 +0000 (UTC) for IP:'209.85.160.195' DOMAIN:'mail-qt1-f195.google.com' HELO:'mail-qt1-f195.google.com' FROM:'jcfaracco@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.108 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 209.85.160.195 mail-qt1-f195.google.com 209.85.160.195 mail-qt1-f195.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.38 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 4/4] rpc: replacing ssh_write_knownhost() by ssh_session_update_known_hosts(). 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.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Fri, 23 Nov 2018 15:02:33 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" After version 0.8.0, libssh deprecated the function scope ssh_write_knownhost() and moved to ssh_session_update_known_hosts(). So, libvirt is failing to compile using this new function name. Signed-off-by: Julio Faracco --- src/rpc/virnetlibsshsession.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpc/virnetlibsshsession.c b/src/rpc/virnetlibsshsession.c index 2252bf2975..07fe284ce0 100644 --- a/src/rpc/virnetlibsshsession.c +++ b/src/rpc/virnetlibsshsession.c @@ -396,7 +396,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.19.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list