From nobody Tue Apr 23 22:22:43 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1528572585726817.4055697863181; Sat, 9 Jun 2018 12:29:45 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 176AA5F7A6; Sat, 9 Jun 2018 19:29:43 +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 9429B308BDA9; Sat, 9 Jun 2018 19:29:41 +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 E00134CA80; Sat, 9 Jun 2018 19:29:38 +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 w59JTaOc011123 for ; Sat, 9 Jun 2018 15:29:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id 52EA377EE4; Sat, 9 Jun 2018 19:29:36 +0000 (UTC) Received: from mx1.redhat.com (ext-mx20.extmail.prod.ext.phx2.redhat.com [10.5.110.49]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4B46177EC7 for ; Sat, 9 Jun 2018 19:29:32 +0000 (UTC) Received: from boum.org (boum.org [204.13.164.192]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4D1843086272 for ; Sat, 9 Jun 2018 19:29:31 +0000 (UTC) Received: from censure.boum.org (censure.boum.org [192.168.122.20]) by boum.org (Postfix) with ESMTP id 46AA79C54 for ; Sat, 9 Jun 2018 21:29:28 +0200 (CEST) Received: from boum.org ([192.168.122.29]) by censure.boum.org (censure.boum.org [192.168.122.20]) (amavisd-new, port 10024) with ESMTP id 6-JDSq4vTlzO; Sat, 9 Jun 2018 21:29:29 +0200 (CEST) Received: from boum.org (boum.org [127.0.0.1]) with ESMTPSA id A90229C4E Received: by localhost (Postfix, from userid 1002) id 246ED72384D; Sat, 9 Jun 2018 21:29:10 +0200 (CEST) From: intrigeri+libvirt@boum.org To: libvir-list@redhat.com Date: Sat, 9 Jun 2018 19:29:02 +0000 Message-Id: <20180609192902.20986-1-intrigeri+libvirt@boum.org> X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Sat, 09 Jun 2018 19:29:31 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Sat, 09 Jun 2018 19:29:31 +0000 (UTC) for IP:'204.13.164.192' DOMAIN:'boum.org' HELO:'boum.org' FROM:'intrigeri@boum.org' RCPT:'' X-RedHat-Spam-Score: -0.009 (RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY) 204.13.164.192 boum.org 204.13.164.192 boum.org X-Scanned-By: MIMEDefang 2.84 on 10.5.110.49 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: intrigeri Subject: [libvirt] [PATCH] AppArmor: allow virt-aa-helper read access to Nova's qcow backing files. 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.84 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Sat, 09 Jun 2018 19:29:44 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: intrigeri As reported on https://bugs.debian.org/892431, without this rule, when laun= ching a QEMU KVM instance, an error occurs immediately upon launching the QEMU process such as: Could not open backing file: Could not open '/var/lib/nova/instances/_base/affe96668a4c64ef380ff1c71b4caec17039080e': Permission denied The other instance disk images are already covered by the existing rule: /**/disk{,.*} r --- examples/apparmor/usr.lib.libvirt.virt-aa-helper | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/apparmor/usr.lib.libvirt.virt-aa-helper b/examples/ap= parmor/usr.lib.libvirt.virt-aa-helper index 6869685c05..e32402a904 100644 --- a/examples/apparmor/usr.lib.libvirt.virt-aa-helper +++ b/examples/apparmor/usr.lib.libvirt.virt-aa-helper @@ -50,6 +50,7 @@ profile virt-aa-helper /usr/{lib,lib64}/libvirt/virt-aa-h= elper { @{HOME}/** r, /var/lib/libvirt/images/ r, /var/lib/libvirt/images/** r, + /var/lib/nova/instances/_base/* r /{media,mnt,opt,srv}/** r, # For virt-sandbox /{,var/}run/libvirt/**/[sv]d[a-z] r, --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list