From nobody Mon May 6 05:56:07 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 1525191726245796.1470248323693; Tue, 1 May 2018 09:22:06 -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 076C5C0587CE; Tue, 1 May 2018 16:22:04 +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 2B09B60929; Tue, 1 May 2018 16:22:03 +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 965DC4CAAA; Tue, 1 May 2018 16:22:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w41GLwiP030367 for ; Tue, 1 May 2018 12:21:58 -0400 Received: by smtp.corp.redhat.com (Postfix) id A075260F8C; Tue, 1 May 2018 16:21:58 +0000 (UTC) Received: from mx1.redhat.com (ext-mx06.extmail.prod.ext.phx2.redhat.com [10.5.110.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 979858517 for ; Tue, 1 May 2018 16:21:54 +0000 (UTC) Received: from mail-qt0-f172.google.com (mail-qt0-f172.google.com [209.85.216.172]) (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 087BF356DF for ; Tue, 1 May 2018 16:21:44 +0000 (UTC) Received: by mail-qt0-f172.google.com with SMTP id h2-v6so15121685qtp.7 for ; Tue, 01 May 2018 09:21:43 -0700 (PDT) Received: from localhost.localdomain ([177.45.6.32]) by smtp.gmail.com with ESMTPSA id b18sm6542170qkj.54.2018.05.01.09.21.40 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 May 2018 09:21:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=3+dNmhN3F86YF1vcjjqy6UTLdHMXDGUJPlO4iZ/BRSQ=; b=VNEWS9/oJDDkidPDoLvgbfrjSoFgF/3fbmGDM4IukPNS+guJ07cRKQZc2umUMSh5t+ E6Xzl+fVClL9NLwi/ZieZZM8v9wN8Y0ypjF61g1X2FsEd2MC6+V3CnnHzTiGOSzpBQ2n hFETDTGUKvf6nyKzJpyhu071gFuhPPK753ErQbnRVFu9Rg4vBGWaeX0lCigxeGahSV6Z uzF27TXcCfRhh6XZhByl0qdarVMwQQbngdBEREyvA2zFb+CPeNpw/rv7MVz6dvFpK2VZ dWfVLHieN/z28O0bjkCT5hY36him06HOBh8EPDzQif94U0s30LxWHTHThcHvFgeKC2A2 1FuA== 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; bh=3+dNmhN3F86YF1vcjjqy6UTLdHMXDGUJPlO4iZ/BRSQ=; b=tfVaKgnRxKRYbRFWVTVt/QEMxer7NGqI9PxHwwknzeHxzIAYv7vQMQNORceZlqPuL6 KJD2Em9CCJyfwFIv49qxm+o/IxpyqDuZ0B/TyCb8RjPVgvv5ez2LXIQeSncAZNU11PDa L1HU3XoBDssU5AX5BhIolvfMF0R6r0i7Kwl58HqjVG12UNrjZPxx9hU7ueZiv0q+r0Z+ ASeqCncbDjPOf2CzHTzq6QNM6XimIffC2Q1FO/XICKb/i7QuxI2pEJ9hClhloJzNh0ol +ScUcXFcMqR3Pjj/CVMgJ33EUNM9a4R45V7Y/lbUYG3Nez87xzcVjzQO9e63Pi8FBMJk UD5Q== X-Gm-Message-State: ALQs6tAxD5Yg4w2lwL9MJ7G2eEBy8FZ6Y//dFVrm/Jjjb1N2iduqf7Fg bFWLPf23coPwX4QWJoBPn1ryXg== X-Google-Smtp-Source: AB8JxZpGCUAR2TkNfb2KlTnyPECw7QY0bOOVAw2KSAj/jW8/uNqjRrXc+NXbxtFrq3ho3hNCHyAvKw== X-Received: by 2002:aed:3327:: with SMTP id u36-v6mr14575468qtd.422.1525191702945; Tue, 01 May 2018 09:21:42 -0700 (PDT) From: Julio Faracco To: libvir-list@redhat.com Date: Tue, 1 May 2018 13:21:15 -0300 Message-Id: <20180501162115.24715-1-jcfaracco@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 01 May 2018 16:21:44 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 01 May 2018 16:21:44 +0000 (UTC) for IP:'209.85.216.172' DOMAIN:'mail-qt0-f172.google.com' HELO:'mail-qt0-f172.google.com' FROM:'jcfaracco@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.3 * (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS, T_DKIM_INVALID) 209.85.216.172 mail-qt0-f172.google.com 209.85.216.172 mail-qt0-f172.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.30 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] rpc: fixing compilation error due to deprecated ssh_get_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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 01 May 2018 16:22:05 +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 0.7.5 release, libssh deprecated ssh_get_publickey() method to introduce ssh_get_server_publickey(). This commit check the current version of libssh and use the proper method during the compilation. See the error: make[3]: Entering directory '/home/julio/Desktop/virt/libvirt/src' CC rpc/libvirt_net_rpc_la-virnetlibsshsession.lo rpc/virnetlibsshsession.c:217:9: error: 'ssh_get_publickey' is deprecated [= -Werror,-Wdeprecated-declarations] if (ssh_get_publickey(sess->session, &key) !=3D SSH_OK) { ^ /usr/include/libssh/libssh.h:489:1: note: 'ssh_get_publickey' has been expl= icitly marked deprecated here SSH_DEPRECATED LIBSSH_API int ssh_get_publickey(ssh_session session, ssh_ke= y *key); ^ /usr/include/libssh/libssh.h:99:40: note: expanded from macro 'SSH_DEPRECAT= ED' ^ 1 error generated. Makefile:8604: recipe for target 'rpc/libvirt_net_rpc_la-virnetlibsshsessio= n.lo' failed Signed-off-by: Julio Faracco --- src/rpc/virnetlibsshsession.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rpc/virnetlibsshsession.c b/src/rpc/virnetlibsshsession.c index 309e8a9340..96c5bc0882 100644 --- a/src/rpc/virnetlibsshsession.c +++ b/src/rpc/virnetlibsshsession.c @@ -214,7 +214,11 @@ virLibsshServerKeyAsString(virNetLibsshSessionPtr sess) size_t keyhashlen; char *str; =20 +#if LIBSSH_VERSION_INT > 0x0705 /* 0.7.5 */ + if (ssh_get_server_publickey(sess->session, &key) !=3D SSH_OK) { +#else if (ssh_get_publickey(sess->session, &key) !=3D SSH_OK) { +#endif 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