From nobody Thu May 2 04:32:15 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 1525984787402262.1832728387286; Thu, 10 May 2018 13:39:47 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ACA23883DF; Thu, 10 May 2018 20:39:45 +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 7159460920; Thu, 10 May 2018 20:39:45 +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 2BF6E180B536; Thu, 10 May 2018 20:39:45 +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 w4AKdYOa016459 for ; Thu, 10 May 2018 16:39:34 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9735E5D762; Thu, 10 May 2018 20:39:34 +0000 (UTC) Received: from mx1.redhat.com (ext-mx18.extmail.prod.ext.phx2.redhat.com [10.5.110.47]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 911685D761 for ; Thu, 10 May 2018 20:39:29 +0000 (UTC) Received: from mail-qk0-f196.google.com (mail-qk0-f196.google.com [209.85.220.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 E51D530CB956 for ; Thu, 10 May 2018 20:39:18 +0000 (UTC) Received: by mail-qk0-f196.google.com with SMTP id c11-v6so2684603qkm.0 for ; Thu, 10 May 2018 13:39:18 -0700 (PDT) Received: from localhost.localdomain ([187.183.58.7]) by smtp.gmail.com with ESMTPSA id s19-v6sm1297462qki.62.2018.05.10.13.39.16 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 May 2018 13:39:17 -0700 (PDT) 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; bh=ulD0FWPaQ1i3+mdbO7I5cm5eIQ1CsIzO8PHNedlzBGw=; b=o8lJ/yprIYa/Zq+Dovn8WWrEtBWRUneR7G2Q4b94tztMM1zUfAFvSTjhtRigk4LECb zaAt3bO99BjRBYxeUHeFb1nwcHuesZ15bGGjnazGIu8eHYtanzCaoxUgjUnqpMh34hKo 7NnrShWeO4u1Ycw9skBp/6tf6uQgJBI2KPTZWv7PBiJgXVQ7Ux1eZha+1SERVI97vPwU T4G2C8JNSt8ql2//vDxJ0ilwqXunbmZBnYT8WLpWPzNA+17VkTrHGq7iYPJIN7tzP550 3KYgpllwp32pXBMiscFPT6Tyasb6XwiVRrrusEtUKB/ni0PUWKGDLeGLoraZAhbMxEtv 2GyQ== 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; bh=ulD0FWPaQ1i3+mdbO7I5cm5eIQ1CsIzO8PHNedlzBGw=; b=e1Vn2kNXHxKCZUpzGNXTK4WtC2REH2u//Zd9gT1ARxENfFjIzsXDORmRVR4IEoq6GN vewFjWNli+Du+kxf+KGCfo4cO/ifnrj1UDZ3DyHMY6zSKiH1SlldXsHj9RsmLvC3qo1b 0thoMAOBpzy1XDf/vvZ97q3Qg0dx8wAt8vjWInKFxZ7GFDnMkxppGRJgnepDKDCHjxBK W3r/2yDq3QPjOgw/4ySj37UmoOcOs5IVmQngbz9i+F0oo+d7EEYD7TjtAMklEC5RR0Ei 8rTjKNEG4RqM0PjujGJ4+4qvSom6/V6mtYXowjsdoP+AHcoEMO9fMHC0uOaJh/KPQomy KA6A== X-Gm-Message-State: ALKqPwdYo+WeTXgb3HPMBLwP7WnNohxmcQEaSZnFZdp4tURjGWqJAyQn NDYQqXJYDKNTwdoU6TTwaNQFQw== X-Google-Smtp-Source: AB8JxZoqYI11GMqyRCj/JuwdTAUXBC0ftM0utWQLrj5BcjzopxsDN435yekLG2d4ETkRNV4+1H1fmg== X-Received: by 2002:a37:52d7:: with SMTP id g206-v6mr2672920qkb.205.1525984757918; Thu, 10 May 2018 13:39:17 -0700 (PDT) From: Julio Faracco To: libvir-list@redhat.com Date: Thu, 10 May 2018 17:38:56 -0300 Message-Id: <20180510203857.10664-2-jcfaracco@gmail.com> In-Reply-To: <20180510203857.10664-1-jcfaracco@gmail.com> References: <20180510203857.10664-1-jcfaracco@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Thu, 10 May 2018 20:39:19 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Thu, 10 May 2018 20:39:19 +0000 (UTC) for IP:'209.85.220.196' DOMAIN:'mail-qk0-f196.google.com' HELO:'mail-qk0-f196.google.com' FROM:'jcfaracco@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.281 * (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS, T_DKIM_INVALID) 209.85.220.196 mail-qk0-f196.google.com 209.85.220.196 mail-qk0-f196.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.47 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v3 1/2] m4: checking if ssh_get_server_publickey() 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: , MIME-Version: 1.0 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 10 May 2018 20:39:46 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This commit adds some checks inside libssh m4 checking to verify if ssh_get_server_publickey is available. This new function scope replaces the old ssh_get_publickey() from libssh 0.7.5 and below. Assuming that some distros are not showing the right version of libssh. This is a simple way to check which function is available. Signed-off-by: Julio Faracco --- m4/virt-libssh.m4 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/m4/virt-libssh.m4 b/m4/virt-libssh.m4 index 7e39277e10..01c3b75c72 100644 --- a/m4/virt-libssh.m4 +++ b/m4/virt-libssh.m4 @@ -23,6 +23,19 @@ AC_DEFUN([LIBVIRT_ARG_LIBSSH],[ =20 AC_DEFUN([LIBVIRT_CHECK_LIBSSH],[ LIBVIRT_CHECK_PKG([LIBSSH], [libssh], [0.7]) + + if test "$with_libssh" =3D "yes" ; then + old_CFLAGS=3D"$CFLAGS" + old_LIBS=3D"$LIBS" + CFLAGS=3D"$CFLAGS $LIBSSH_CFLAGS" + LIBS=3D"$LIBS $LIBSSH_LIBS" + AC_CHECK_FUNC([ssh_get_server_publickey], + [], + [AC_DEFINE_UNQUOTED([ssh_get_server_publickey], [ssh_get_publickey], + [ssh_get_publickey is deprecated and replaced by ssh_get_serve= r_publickey.])]) + CFLAGS=3D"$old_CFLAGS" + LIBS=3D"$old_LIBS" + fi ]) =20 AC_DEFUN([LIBVIRT_RESULT_LIBSSH],[ --=20 2.17.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 04:32:15 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 1525984782531885.462051911459; Thu, 10 May 2018 13:39:42 -0700 (PDT) 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 E18A930CD9B3; Thu, 10 May 2018 20:39:40 +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 B07516017E; Thu, 10 May 2018 20:39:40 +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 5D8304CAB0; Thu, 10 May 2018 20:39:40 +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 w4AKdbr1016470 for ; Thu, 10 May 2018 16:39:37 -0400 Received: by smtp.corp.redhat.com (Postfix) id AAE0C60920; Thu, 10 May 2018 20:39:37 +0000 (UTC) Received: from mx1.redhat.com (ext-mx05.extmail.prod.ext.phx2.redhat.com [10.5.110.29]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A2820608EE for ; Thu, 10 May 2018 20:39:34 +0000 (UTC) Received: from mail-qk0-f195.google.com (mail-qk0-f195.google.com [209.85.220.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 44DB4A737 for ; Thu, 10 May 2018 20:39:23 +0000 (UTC) Received: by mail-qk0-f195.google.com with SMTP id p186-v6so2689159qkd.1 for ; Thu, 10 May 2018 13:39:23 -0700 (PDT) Received: from localhost.localdomain ([187.183.58.7]) by smtp.gmail.com with ESMTPSA id s19-v6sm1297462qki.62.2018.05.10.13.39.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 May 2018 13:39:21 -0700 (PDT) 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; bh=CwLvDnhp0KTep6z5z0nI50KD7i/j8E/AG6cQGcW2Fgc=; b=h8Uon7klCW5AktMB8ztwJ1fQmWZADEnvQ1nRTJS2Y5xivoXifqbSYKUWI4y1PiFRW2 JRKHgtWGOTkBYZDrbUEhfCp+DQQefPcvuonwrH79LxE/9YgZu9O5QX7S0ypvvB+tyLzJ 6jEK6jzO26OXkalNGegPe6QjWqmnkTzwX6L8DhFvEcibABcPrz236eACEdOy/cVfe4Uo i5IxwkKReDcNRvmHgIZ+0tUv2oe3+9bN+zXROeRkBqLn7i4INu/e+j/Mwo5UBDqxAGz3 7k+2eWpuggOmCX6J6E2/+Kg4KLQ3QF6bBZgQhz6YHp6DLekkaXk70lKFTZSsjE0ec4Ay CQVg== 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; bh=CwLvDnhp0KTep6z5z0nI50KD7i/j8E/AG6cQGcW2Fgc=; b=BvIwS25Ej4skHLpEx43XLwuVpLQbtCxPu/Wcs9EMyCNod8JFcHy9Ib0TyDcG1pAkhs +wWxS1Fw1h97qFyrf1OgnJdptqT29b93Xe9sFn0ZMVrhAcRPxzcChW75TnK+a+VzazoC oufe168404aP5yX18viv04e1FPMHr2dUtISdGu59xxUdbc1T+uDLdMYK+6aMrrAdrOfa TgpL+LFKm9YlECL3us+MxjzOvL0+3VR1HBZiu0nU9HKntf/MqoZwtbDf5gk9zAyHrUn3 CwieaFyTCAEnkTqqyP8fvzWY/eKbZmChrFLsGiKW8L4M9FBJGeuT2ByrD8dlgiz4tUhn 05IA== X-Gm-Message-State: ALKqPwfW6yMNsDzehSWYeqyqe8Alb6Bh3dLxzdgqr+mzzzToYoHUDqep 2nqL7yXqlClQbG3LJNGG3VUbWg== X-Google-Smtp-Source: AB8JxZrl48iBZcPQDlsv6xHBKnaHX9eogP5RoMiM1+ru4kCEZT66Z5L0yikY01No3bNpHQRhm9cQXw== X-Received: by 2002:a37:298b:: with SMTP id p11-v6mr2603451qkp.52.1525984762269; Thu, 10 May 2018 13:39:22 -0700 (PDT) From: Julio Faracco To: libvir-list@redhat.com Date: Thu, 10 May 2018 17:38:57 -0300 Message-Id: <20180510203857.10664-3-jcfaracco@gmail.com> In-Reply-To: <20180510203857.10664-1-jcfaracco@gmail.com> References: <20180510203857.10664-1-jcfaracco@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 10 May 2018 20:39:23 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 10 May 2018 20:39:23 +0000 (UTC) for IP:'209.85.220.195' DOMAIN:'mail-qk0-f195.google.com' HELO:'mail-qk0-f195.google.com' FROM:'jcfaracco@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.281 * (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS, T_DKIM_INVALID) 209.85.220.195 mail-qk0-f195.google.com 209.85.220.195 mail-qk0-f195.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.29 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v3 2/2] rpc: replacing ssh_get_publickey() by ssh_get_server_publickey(). 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: , MIME-Version: 1.0 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]); Thu, 10 May 2018 20:39:41 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" After version 0.7.5, libssh deprecated the function scope ssh_get_publickey() and moved to ssh_get_server_publickey(). 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 309e8a9340..6d78d2569e 100644 --- a/src/rpc/virnetlibsshsession.c +++ b/src/rpc/virnetlibsshsession.c @@ -214,7 +214,7 @@ virLibsshServerKeyAsString(virNetLibsshSessionPtr sess) size_t keyhashlen; char *str; =20 - if (ssh_get_publickey(sess->session, &key) !=3D SSH_OK) { + if (ssh_get_server_publickey(sess->session, &key) !=3D SSH_OK) { virReportError(VIR_ERR_LIBSSH, "%s", _("failed to get the key of the current " "session")); --=20 2.17.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list