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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C6C93138334 for ; Tue, 26 Mar 2019 10:17:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DCD5FE0871; Tue, 26 Mar 2019 10:17:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B8823E0870 for ; Tue, 26 Mar 2019 10:17:36 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8B312335CFB for ; Tue, 26 Mar 2019 10:17:35 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CD28D57E for ; Tue, 26 Mar 2019 10:17:33 +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: <1553508325.98f3eac837bb8fa985f1f3fe7090e17573c9f3a9.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 X-VCS-Directories: policy/modules/kernel/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: 98f3eac837bb8fa985f1f3fe7090e17573c9f3a9 X-VCS-Branch: master Date: Tue, 26 Mar 2019 10:17:33 +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: 0b792599-80f7-4c1e-b94c-db96787ce956 X-Archives-Hash: 84060153f4321bd1afd85f47b6c78e57 commit: 98f3eac837bb8fa985f1f3fe7090e17573c9f3a9 Author: Sugar, David tresys com> AuthorDate: Tue Mar 5 22:32:44 2019 +0000 Commit: Jason Zaman gentoo org> CommitDate: Mon Mar 25 10:05:25 2019 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=98f3eac8 Add interface to allow relabeling of iso 9660 filesystems. I have a case where I'm labeling media with my own types to control access. But that is requiring that I relabel from iso9660_t to my own type. This interface allows that relabel. type=AVC msg=audit(1551621984.372:919): avc: denied { relabelfrom } for pid=9717 comm="mount" scontext=staff_u:staff_r:mymedia_sudo_t:s0-s0:c0.c1023 tcontext=system_u:object_r:iso9660_t:s0 tclass=filesystem permissive=0 Signed-off-by: Dave Sugar tresys.com> Signed-off-by: Jason Zaman perfinion.com> policy/modules/kernel/filesystem.if | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/policy/modules/kernel/filesystem.if b/policy/modules/kernel/filesystem.if index 6da7cc22..603bfc28 100644 --- a/policy/modules/kernel/filesystem.if +++ b/policy/modules/kernel/filesystem.if @@ -2505,6 +2505,25 @@ interface(`fs_remount_iso9660_fs',` allow $1 iso9660_t:filesystem remount; ') +######################################## +## +## Allow changing of the label of a +## filesystem with iso9660 type +## +## +## +## Domain allowed access. +## +## +# +interface(`fs_relabelfrom_iso9660_fs',` + gen_require(` + type iso9660_t; + ') + + allow $1 iso9660_t:filesystem relabelfrom; +') + ######################################## ## ## Unmount an iso9660 filesystem, which