From nobody Tue Apr 30 20:34:56 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 1505490460141603.8782593888673; Fri, 15 Sep 2017 08:47:40 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C42EC7E428; Fri, 15 Sep 2017 15:47:38 +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 4A91E71CB2; Fri, 15 Sep 2017 15:47:38 +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 187E1410B3; Fri, 15 Sep 2017 15:47:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v8FFI2Za019939 for ; Fri, 15 Sep 2017 11:18:02 -0400 Received: by smtp.corp.redhat.com (Postfix) id 28D8471C94; Fri, 15 Sep 2017 15:18:02 +0000 (UTC) Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2395C71CAF for ; Fri, 15 Sep 2017 15:17:59 +0000 (UTC) Received: from honk.sigxcpu.org (honk.sigxcpu.org [24.134.29.49]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D1024883B9 for ; Fri, 15 Sep 2017 15:17:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id 3D7E4FB04; Fri, 15 Sep 2017 17:17:56 +0200 (CEST) Received: from honk.sigxcpu.org ([127.0.0.1]) by localhost (honk.sigxcpu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id N1_al1rOxSqO; Fri, 15 Sep 2017 17:17:55 +0200 (CEST) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id 4535D41630; Fri, 15 Sep 2017 17:17:54 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com C42EC7E428 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=sigxcpu.org Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com C42EC7E428 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D1024883B9 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=sigxcpu.org Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=none smtp.mailfrom=agx@sigxcpu.org DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com D1024883B9 X-Virus-Scanned: Debian amavisd-new at honk.sigxcpu.org Date: Fri, 15 Sep 2017 17:17:54 +0200 From: Guido =?iso-8859-1?Q?G=FCnther?= To: libvir-list@redhat.com Message-ID: <20170915151754.66a3lmu7lkkyadoj@bogon.m.sigxcpu.org> Mail-Followup-To: Guido =?iso-8859-1?Q?G=FCnther?= , libvir-list@redhat.com, intrigeri , Christian Ehrhardt MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20170609 (1.8.3) X-Greylist: Delayed for 27:48:19 by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 15 Sep 2017 15:17:58 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 15 Sep 2017 15:17:58 +0000 (UTC) for IP:'24.134.29.49' DOMAIN:'honk.sigxcpu.org' HELO:'honk.sigxcpu.org' FROM:'agx@sigxcpu.org' RCPT:'' X-RedHat-Spam-Score: -0.001 (RP_MATCHES_RCVD) 24.134.29.49 honk.sigxcpu.org 24.134.29.49 honk.sigxcpu.org X-Scanned-By: MIMEDefang 2.78 on 10.5.110.26 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: intrigeri , Christian Ehrhardt Subject: [libvirt] [PATCH] apparmor: add attach_disconnected 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.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 15 Sep 2017 15:47:39 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Otherwise we fail to reconnect to /dev/net/tun opened by libvirtd like [ 8144.507756] audit: type=3D1400 audit(1505488162.386:38069121): appar= mor=3D"DENIED" operation=3D"file_perm" info=3D"Failed name lookup - disconn= ected path" error=3D-13 profile=3D"libvirt-5dfcc8a7-b79a-4fa9-a41f-f6271651= 934c" name=3D"dev/net/tun" pid=3D9607 comm=3D"qemu-system-x86" requested_ma= sk=3D"r" denied_mask=3D"r" fsuid=3D117 ouid=3D0 --- I do wonder why we didn't see this earlier though. examples/apparmor/TEMPLATE.lxc | 2 +- examples/apparmor/TEMPLATE.qemu | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/apparmor/TEMPLATE.lxc b/examples/apparmor/TEMPLATE.lxc index 7b64885a1c..f1005dc575 100644 --- a/examples/apparmor/TEMPLATE.lxc +++ b/examples/apparmor/TEMPLATE.lxc @@ -4,7 +4,7 @@ =20 #include =20 -profile LIBVIRT_TEMPLATE { +profile LIBVIRT_TEMPLATE flags=3D(attach_disconnected) { #include =20 # Globally allows everything to run under this profile diff --git a/examples/apparmor/TEMPLATE.qemu b/examples/apparmor/TEMPLATE.q= emu index 008a221244..a327315d92 100644 --- a/examples/apparmor/TEMPLATE.qemu +++ b/examples/apparmor/TEMPLATE.qemu @@ -4,6 +4,6 @@ =20 #include =20 -profile LIBVIRT_TEMPLATE { +profile LIBVIRT_TEMPLATE flags=3D(attach_disconnected) { #include } --=20 2.14.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list