From nobody Mon Feb 9 02:51:51 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1673972493; cv=none; d=zohomail.com; s=zohoarc; b=HqAkfZOOc7HeDCSBPjBf4gWeZmRuRlR69LsxxlRXm5RVXAojjUclyF7GWkoougaTOH15iVSHk/k8kubkfliO9tknEYcNSceaB4wf7cnIH5/rFjCSeCcIflsv3NEsXrgUvcYh2P4i7BJi7QvCOHicsrYJskOLpv8oT93gHeBCCkE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673972493; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=y9+SXpX+H9s0gopa3mDiz5q2BewFgPuwpP2kZEg51Oc=; b=e68oXP4Cedcp0eT0P2J8vVnnE/kUjPjl4T39saorlWHI4cK9JmpQszjPqTLI35Moxy9XqRngqYFhMf3ko03PCQ/JQ9DFuZrGAGUIn/V8M9vEwNeGQSVkeyAt8sH5X/JL+vBQUwttSP/MMSYrCPxY7PLcNRoUWXC+32dGrxzRhKQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 167397249347187.41477541058657; Tue, 17 Jan 2023 08:21:33 -0800 (PST) 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-46-Hyx4XJ8NOAuioFfoH3BO7w-1; Tue, 17 Jan 2023 11:21:07 -0500 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 B67581991C4A; Tue, 17 Jan 2023 16:20:49 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6BCFAC15BA0; Tue, 17 Jan 2023 16:20:49 +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 5DA0019465A4; Tue, 17 Jan 2023 16:20:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A0ABD19465A3 for ; Tue, 17 Jan 2023 16:20:47 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 81BDF112131E; Tue, 17 Jan 2023 16:20:47 +0000 (UTC) Received: from speedmetal.lan (ovpn-208-29.brq.redhat.com [10.40.208.29]) by smtp.corp.redhat.com (Postfix) with ESMTP id BC3D21121315 for ; Tue, 17 Jan 2023 16:20:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673972492; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=y9+SXpX+H9s0gopa3mDiz5q2BewFgPuwpP2kZEg51Oc=; b=WChCx2DdnWsXMhTkbJS4UEt/Xv5Uok43fbOq2t6DXBA4KN7sZBrvzKNbJbqfDU/IEPuVu2 vjz4mmGedIGHVa1ekIYPWjEe+kCDw9y9LxtMfDChkrk4bgwtsb7t36JA2wBGCT+f7Pr0X1 2C81p3BfBjIaxMUD+l+oo2iD8GndzuM= X-MC-Unique: Hyx4XJ8NOAuioFfoH3BO7w-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 05/15] virNetSSHSessionAuthAddPrivKeyAuth: Remove unused 'password' argument Date: Tue, 17 Jan 2023 17:20:30 +0100 Message-Id: <79dd0f34e26b5457fa4b3a8a13a9a7afe2508ca5.1673972406.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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: 1673972494932100001 Content-Type: text/plain; charset="utf-8" The only caller doesn't pass the password. Remove the argument. Signed-off-by: Peter Krempa --- src/rpc/virnetsocket.c | 3 +-- src/rpc/virnetsshsession.c | 7 +------ src/rpc/virnetsshsession.h | 3 +-- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c index 8fbc69d51c..b9b7328f87 100644 --- a/src/rpc/virnetsocket.c +++ b/src/rpc/virnetsocket.c @@ -954,8 +954,7 @@ virNetSocketNewConnectLibSSH2(const char *host, } else if (STRCASEEQ(authMethod, "privkey")) { ret =3D virNetSSHSessionAuthAddPrivKeyAuth(sess, username, - privkey, - NULL); + privkey); } else if (STRCASEEQ(authMethod, "agent")) { ret =3D virNetSSHSessionAuthAddAgentAuth(sess, username); } else { diff --git a/src/rpc/virnetsshsession.c b/src/rpc/virnetsshsession.c index 485318d09b..08f246be61 100644 --- a/src/rpc/virnetsshsession.c +++ b/src/rpc/virnetsshsession.c @@ -1056,13 +1056,11 @@ virNetSSHSessionAuthAddAgentAuth(virNetSSHSession *= sess, int virNetSSHSessionAuthAddPrivKeyAuth(virNetSSHSession *sess, const char *username, - const char *keyfile, - const char *password) + const char *keyfile) { virNetSSHAuthMethod *auth; char *user =3D NULL; - char *pass =3D NULL; char *file =3D NULL; if (!username || !keyfile) { @@ -1076,13 +1074,11 @@ virNetSSHSessionAuthAddPrivKeyAuth(virNetSSHSession= *sess, user =3D g_strdup(username); file =3D g_strdup(keyfile); - pass =3D g_strdup(password); if (!(auth =3D virNetSSHSessionAuthMethodNew(sess))) goto error; auth->username =3D user; - auth->password =3D pass; auth->filename =3D file; auth->method =3D VIR_NET_SSH_AUTH_PRIVKEY; @@ -1091,7 +1087,6 @@ virNetSSHSessionAuthAddPrivKeyAuth(virNetSSHSession *= sess, error: VIR_FREE(user); - VIR_FREE(pass); VIR_FREE(file); virObjectUnlock(sess); return -1; diff --git a/src/rpc/virnetsshsession.h b/src/rpc/virnetsshsession.h index 7a056df37f..8d6c99c547 100644 --- a/src/rpc/virnetsshsession.h +++ b/src/rpc/virnetsshsession.h @@ -56,8 +56,7 @@ int virNetSSHSessionAuthAddAgentAuth(virNetSSHSession *se= ss, int virNetSSHSessionAuthAddPrivKeyAuth(virNetSSHSession *sess, const char *username, - const char *keyfile, - const char *password); + const char *keyfile); int virNetSSHSessionAuthAddKeyboardAuth(virNetSSHSession *sess, const char *username, --=20 2.38.1