From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id E232E5A026F for ; Wed, 16 Aug 2023 11:10:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692177044; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4Ni5VAPS7DuINTSqL02+wYB+6qjJDEgobrD4mDbnKK8=; b=DnEjl40U11ypc5iwGN9ePnzV8vQfGFe59Pln4lia6rOc5rXj5SF6qv+TIkPjjpMvPfbDR7 1nsjgU77vCpxDMOiMx4bipV72bj6TZL6gihbXg9GXXXSUNte69/2/dk4tQ3hbx4p+sfsCj zO2YxfYtjiAcobURG8MEKDfhFnnYZmk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-508-LJXtwBi1O_uWzYsnD2-p9A-1; Wed, 16 Aug 2023 05:10:42 -0400 X-MC-Unique: LJXtwBi1O_uWzYsnD2-p9A-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1C0BB8DC66C; Wed, 16 Aug 2023 09:10:42 +0000 (UTC) Received: from localhost (unknown [10.42.28.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id D2E332166B2D; Wed, 16 Aug 2023 09:10:41 +0000 (UTC) Date: Wed, 16 Aug 2023 10:10:41 +0100 From: "Richard W.M. Jones" To: Stefano Brivio Subject: Re: [PATCH 6/7] selinux: Allow pasta_t to read nsfs entries Message-ID: <20230816091041.GF7636@redhat.com> References: <20230816060038.870746-1-sbrivio@redhat.com> <20230816060038.870746-7-sbrivio@redhat.com> MIME-Version: 1.0 In-Reply-To: <20230816060038.870746-7-sbrivio@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Message-ID-Hash: 5C5EGSPCH367FFEFPCTBB6UXRKZR27SA X-Message-ID-Hash: 5C5EGSPCH367FFEFPCTBB6UXRKZR27SA X-MailFrom: rjones@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top, David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Wed, Aug 16, 2023 at 08:00:37AM +0200, Stefano Brivio wrote: > This is needed to monitor filesystem-bound namespaces and quit when > they're gone -- this feature never really worked with SELinux. > > Fixes: 745a9ba4284c ("pasta: By default, quit if filesystem-bound net namespace goes away") > Signed-off-by: Stefano Brivio > --- > contrib/selinux/pasta.te | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/contrib/selinux/pasta.te b/contrib/selinux/pasta.te > index b3ddc6a..31e82dc 100644 > --- a/contrib/selinux/pasta.te > +++ b/contrib/selinux/pasta.te > @@ -187,6 +187,8 @@ allow pasta_t sysctl_net_t:dir search; > allow pasta_t sysctl_net_t:file { open write }; > allow pasta_t kernel_t:system module_request; > > +allow pasta_t nsfs_t:file read; > + > allow pasta_t net_conf_t:lnk_file read; > allow pasta_t proc_net_t:lnk_file read; Acked-by: Richard W.M. Jones -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v