From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A9893158086 for ; Thu, 11 Nov 2021 21:27:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DE6452BC0DD; Thu, 11 Nov 2021 21:27:39 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B95FC2BC0DD for ; Thu, 11 Nov 2021 21:27:39 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E51503431EF for ; Thu, 11 Nov 2021 21:27:38 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 31A8F1C6 for ; Thu, 11 Nov 2021 21:27:36 +0000 (UTC) From: "Jason Zaman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jason Zaman" Message-ID: <1636666010.c428d96914b347500d42a2e959950845d52512e6.perfinion@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/kernel/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/kernel/filesystem.if policy/modules/kernel/filesystem.te X-VCS-Directories: policy/modules/kernel/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: c428d96914b347500d42a2e959950845d52512e6 X-VCS-Branch: master Date: Thu, 11 Nov 2021 21:27:36 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 704804fa-4daa-489d-aa0d-6e16becc6859 X-Archives-Hash: 9d4631ff9d3d8b46fe158ac602d97e7b commit: c428d96914b347500d42a2e959950845d52512e6 Author: Kenton Groombridge concord sh> AuthorDate: Mon Nov 1 17:01:20 2021 +0000 Commit: Jason Zaman gentoo org> CommitDate: Thu Nov 11 21:26:50 2021 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=c428d969 fs: add pseudofs attribute and interfaces Signed-off-by: Kenton Groombridge concord.sh> Signed-off-by: Jason Zaman gentoo.org> policy/modules/kernel/filesystem.if | 21 +++++++++++++++++++++ policy/modules/kernel/filesystem.te | 3 ++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/policy/modules/kernel/filesystem.if b/policy/modules/kernel/filesystem.if index 22759baa..1c7beefd 100644 --- a/policy/modules/kernel/filesystem.if +++ b/policy/modules/kernel/filesystem.if @@ -43,6 +43,27 @@ interface(`fs_noxattr_type',` typeattribute $1 noxattrfs; ') +######################################## +## +## Transform specified type into a filesystem +## type which is a pseudo filesystem. +## +## +## +## Domain allowed access. +## +## +# +interface(`fs_pseudo_type',` + gen_require(` + attribute pseudofs; + ') + + fs_type($1) + + typeattribute $1 pseudofs; +') + ######################################## ## ## Transform specified type into a filesystem diff --git a/policy/modules/kernel/filesystem.te b/policy/modules/kernel/filesystem.te index 81a32650..ddd10c2a 100644 --- a/policy/modules/kernel/filesystem.te +++ b/policy/modules/kernel/filesystem.te @@ -9,6 +9,7 @@ attribute filesystem_image_file_type; attribute filesystem_type; attribute filesystem_unconfined_type; attribute noxattrfs; +attribute pseudofs; attribute xattrfs; ############################## @@ -104,7 +105,7 @@ files_mountpoint(ecryptfs_t) genfscon ecryptfs / gen_context(system_u:object_r:ecryptfs_t,s0) type efivarfs_t; -fs_noxattr_type(efivarfs_t) +fs_pseudo_type(efivarfs_t) files_mountpoint(efivarfs_t) genfscon efivarfs / gen_context(system_u:object_r:efivarfs_t,s0)