From nobody Mon Feb 9 09:52:02 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1650641529; cv=none; d=zohomail.com; s=zohoarc; b=A9pRzyzdVdRsk8MueyZ3GOqqaqVpvSCkf84AKFE21gZqWEucTfvF5Fa6F27QD8whzMD9jdB4RA4JVEmnsuW8jnI4ABTSI5snMdABVf+L5ilsnyQklDRYPLSiw+3X3sbn6m8JBLfZf1IpNDuAG4Y/SsBxF3mIG8gTDDEEo2oMu9M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1650641529; 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=IG86aEtWOYN8fBnHhuiIQNaPN559S4oujSseSY9X6pA=; b=Z0NLnE4nDq2l0XZSrRY205TEsF+jCqE2IpZMjUrrfTIr6X7uWLUxkJ/9rf3kdkZccmjFcrqLhJf2SFR6fAlUtHDf7qzz+bKlkVL0C+k/FfaoTwQGMq+iMqEyZIx+rSt1MukOKfQKNppf/kEPmXMf7D/WC1vhmZm7RvcwH0u9keU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1650641529622446.8130296883471; Fri, 22 Apr 2022 08:32:09 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-161-w0DvTpMYMBeSTC9tSwhT7w-1; Fri, 22 Apr 2022 11:32:06 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CFC29383A5F8; Fri, 22 Apr 2022 15:32:03 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id B80BB41636C; Fri, 22 Apr 2022 15:32:03 +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 538D81940369; Fri, 22 Apr 2022 15:32:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 80D3F194036B for ; Fri, 22 Apr 2022 15:32:02 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 74D05416158; Fri, 22 Apr 2022 15:32:02 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.36]) by smtp.corp.redhat.com (Postfix) with ESMTP id E95B0401475 for ; Fri, 22 Apr 2022 15:32:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650641528; 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=IG86aEtWOYN8fBnHhuiIQNaPN559S4oujSseSY9X6pA=; b=addgkkZLyeWteYMKeQF4twcRLdVxNEJ1wCDeYSrGhZwg7a+aCz4lriFHWYZSqOYTtZr/Vp xn10TKj2GNkk7RkAvd7t6ZZo70uvenfNiK4QlBR1mImDzguGDzJpPAdMh+gTGow9MJ0WwG zW6TWxxxw4JTcCwq2rvP69DLZlyHn9M= X-MC-Unique: w0DvTpMYMBeSTC9tSwhT7w-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 06/11] qemuDomainStorageSourceHasAuth: Don't decide based on protocol Date: Fri, 22 Apr 2022 17:31:50 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 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 2.85 on 10.11.54.10 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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: 1650641591659100001 Content-Type: text/plain; charset="utf-8" The validation should be the only point to decide whether authentication is supported for a disk backing protocol. The rest of the code can then simply always enable it. This also fixes a crash when authentication is requested e.g. for a HTTP backed disk as the blockdev props formatter expects that it was already set up. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index b5abf99951..0486826fc7 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1236,9 +1236,7 @@ qemuDomainStorageSourceHasAuth(virStorageSource *src) { if (!virStorageSourceIsEmpty(src) && virStorageSourceGetActualType(src) =3D=3D VIR_STORAGE_TYPE_NETWORK= && - src->auth && - (src->protocol =3D=3D VIR_STORAGE_NET_PROTOCOL_ISCSI || - src->protocol =3D=3D VIR_STORAGE_NET_PROTOCOL_RBD)) + src->auth) return true; return false; --=20 2.35.1