From nobody Sun Feb 8 20:53:38 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1611590827; cv=none; d=zohomail.com; s=zohoarc; b=EGnaYvaaJTLwzaGbd+T1p4QNsL+6lzJPXXPkpSpOvA4WZU4+l+lwFIZ4//XNQg5u4+6w9f7pLx7g04mvUe5qrATu7M4JMbUqXEQovAQHxrG8kD04i3g/sAY+elbPVbuQ9r860rztAbnewgwtUXUuQV6GboIGBB1VsMLGpqk5s5s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611590827; 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=BvCFsDvIom7+4sFDJQhJ2zKQx16QQd1j0lgHEbhwlk0=; b=IhJPtC60SW6GVlgxUIGz+dGk+UCcHUAyscdBypvHaM9EVogqhfRiw6LUjQxx1Xg3Dn87MtR81L0O/Hf5XoCwPlJ5+p+4OVhQpxiLtvL/8/dE294kimBgRgrPt+eLSEEyNlwN43uAVvc/jT6C5zgIYdfJLHv0rPmJAVpvS6Ry1Ps= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1611590827829779.7398402948428; Mon, 25 Jan 2021 08:07:07 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-470-lL9hz5iIMfeUNpZFnrdExg-1; Mon, 25 Jan 2021 11:06:01 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 26C8C84E246; Mon, 25 Jan 2021 16:05:51 +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 0424B7086D; Mon, 25 Jan 2021 16:05:51 +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 BF35050035; Mon, 25 Jan 2021 16:05:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 10PG5b9M018244 for ; Mon, 25 Jan 2021 11:05:37 -0500 Received: by smtp.corp.redhat.com (Postfix) id 0E6C95D9DB; Mon, 25 Jan 2021 16:05:37 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5F55B5D9DC for ; Mon, 25 Jan 2021 16:05:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611590826; 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=BvCFsDvIom7+4sFDJQhJ2zKQx16QQd1j0lgHEbhwlk0=; b=KwMyM3YOjYIrdj8a+ZkGlORTUFeDfTjh/AvbszWkf5p2+bDUCBztlDieDWzQrKnkOL0EYV CqEPyRhkDvh1yzfaKtrjsk85c3XYdTe3LAOtCKZe/+lPUcFUqyum1OIVREkRs86Oj1Ls/K P08uHMZ3ugKEAECQ5xpZoklSGE/UOEY= X-MC-Unique: lL9hz5iIMfeUNpZFnrdExg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 06/12] virt-aa-helper: Use proper check for empty disk in 'get_files' Date: Mon, 25 Jan 2021 17:05:18 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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) Content-Type: text/plain; charset="utf-8" 'virDomainDiskGetSource' returns src->path effectively. Checking whether a disk is empty is done via 'virStorageSourceIsEmpty'. Signed-off-by: Peter Krempa --- src/security/virt-aa-helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index f71fe6f23b..d3abe37a8c 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -933,7 +933,7 @@ get_files(vahControl * ctl) for (i =3D 0; i < ctl->def->ndisks; i++) { virDomainDiskDefPtr disk =3D ctl->def->disks[i]; - if (!virDomainDiskGetSource(disk)) + if (virStorageSourceIsEmpty(disk->src)) continue; /* XXX - if we knew the qemu user:group here we could send it in * so that the open could be re-tried as that user:group. --=20 2.29.2