From nobody Sun May 5 03:18:17 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; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1570821224; cv=none; d=zoho.com; s=zohoarc; b=mPaIVDJPXlXKjIoIAqeIu9LJdKLyFgeQgh1pb+dtxs0sePUZW6uVyLdyBdI2fH9uKXrbWPnRX8NcGinViwTscOJ07YUEYJ5lBoLLKYforeEEGjkXr8fujTrhpFaojCgjReb+4VwU2y5m+7tgQ2XhCzqf0KYpzk3K+y+cPF4o3Rw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570821224; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=5Liz/U+LazTmh64cZoEmeSopBB19nnTcrQkZtf2gv4c=; b=WUNI71ZZfniVNMszBtLvr1xfa11azc/YCwZaJ/ahLSuWb5HPCvXeLJwZMGpgXjNx2iL/XgfqtQ4NPUYnu3c44sHbirp4V3Ey+/dSk9999ENi7ziTSZ+7Z37wWxDRXwBtEw35EPUo8nP2HgRGpGMDXPpn1l/NPvtuWNiPCXZAE+4= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1570821224913160.0845364230015; Fri, 11 Oct 2019 12:13:44 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 87E90316D8D0; Fri, 11 Oct 2019 19:13:42 +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 E5D391001B07; Fri, 11 Oct 2019 19:13:39 +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 ADC7818005A0; Fri, 11 Oct 2019 19:13:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x9BJDZTb029023 for ; Fri, 11 Oct 2019 15:13:35 -0400 Received: by smtp.corp.redhat.com (Postfix) id 016611001B11; Fri, 11 Oct 2019 19:13:35 +0000 (UTC) Received: from worklaptop.redhat.com (ovpn-124-31.rdu2.redhat.com [10.10.124.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id ED6961001B07; Fri, 11 Oct 2019 19:13:33 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Fri, 11 Oct 2019 15:14:04 -0400 Message-Id: <49dfeac6e8fabdd92981ef01a3fc509f504543f4.1570821213.git.crobinso@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: christian.ehrhardt@canonical.com Subject: [libvirt] [PATCH] security: apparmor: Label externalDataStore 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Fri, 11 Oct 2019 19:13:43 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Teach virt-aa-helper how to label a qcow2 data_file, tracked internally as externalDataStore. It should be treated the same as its sibling disk image Signed-off-by: Cole Robinson --- Compiled but not runtime tested, I don't have an apparmor setup src/security/virt-aa-helper.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index 509187ac36..fe6fa12550 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -949,6 +949,10 @@ storage_source_add_files(virStorageSourcePtr src, if (add_file_path(tmp, depth, buf) < 0) return -1; =20 + if (src->externalDataStore && + storage_source_add_files(src->externalDataStore, buf, depth) <= 0) + return -1; + depth++; } =20 --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list