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 30D32158086 for ; Sun, 21 Nov 2021 03:00:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 93D40E0845; Sun, 21 Nov 2021 03:00:10 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 4B95DE0845 for ; Sun, 21 Nov 2021 03:00:10 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 593CF34302C for ; Sun, 21 Nov 2021 03:00:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 383221F0 for ; Sun, 21 Nov 2021 03:00:04 +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: <1637449104.e65914649a2dc3fae590c9df612c70b957a6ef5d.perfinion@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/mcs X-VCS-Directories: policy/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: e65914649a2dc3fae590c9df612c70b957a6ef5d X-VCS-Branch: master Date: Sun, 21 Nov 2021 03:00:04 +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: 0de46a4e-37dc-4820-b1d6-a2d6a02948c7 X-Archives-Hash: 105e62cb9a933f65ace5d31ad48e9e05 commit: e65914649a2dc3fae590c9df612c70b957a6ef5d Author: Kenton Groombridge concord sh> AuthorDate: Tue Nov 9 18:59:08 2021 +0000 Commit: Jason Zaman gentoo org> CommitDate: Sat Nov 20 22:58:24 2021 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=e6591464 mcs: only constrain mcs_constrained_type for db accesses Signed-off-by: Kenton Groombridge concord.sh> Signed-off-by: Jason Zaman gentoo.org> policy/mcs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/policy/mcs b/policy/mcs index 023bd149..c9b7e83e 100644 --- a/policy/mcs +++ b/policy/mcs @@ -133,41 +133,41 @@ mlsconstrain context contains # Any database object must be dominated by the relabeling subject # clearance, also the objects are single-level. mlsconstrain { db_database db_schema db_table db_sequence db_view db_procedure db_language db_column db_blob } { create relabelto } - (( h1 dom h2 ) and ( l2 eq h2 )); + ((( h1 dom h2 ) and ( l2 eq h2 )) or ( t1 != mcs_constrained_type )); mlsconstrain { db_tuple } { insert relabelto } - (( h1 dom h2 ) and ( l2 eq h2 )); + ((( h1 dom h2 ) and ( l2 eq h2 )) or ( t1 != mcs_constrained_type )); # Access control for any database objects based on MCS rules. mlsconstrain db_database { drop getattr setattr relabelfrom access install_module load_module get_param set_param } - ( h1 dom h2 ); + (( h1 dom h2 ) or ( t1 != mcs_constrained_type )); mlsconstrain db_schema { drop getattr setattr relabelfrom search } - ( h1 dom h2 ); + (( h1 dom h2 ) or ( t1 != mcs_constrained_type )); mlsconstrain db_table { drop getattr setattr relabelfrom select update insert delete lock } - ( h1 dom h2 ); + (( h1 dom h2 ) or ( t1 != mcs_constrained_type )); mlsconstrain db_column { drop getattr setattr relabelfrom select update insert } - ( h1 dom h2 ); + (( h1 dom h2 ) or ( t1 != mcs_constrained_type )); mlsconstrain db_tuple { relabelfrom select update delete use } - ( h1 dom h2 ); + (( h1 dom h2 ) or ( t1 != mcs_constrained_type )); mlsconstrain db_sequence { drop getattr setattr relabelfrom get_value next_value set_value } - ( h1 dom h2 ); + (( h1 dom h2 ) or ( t1 != mcs_constrained_type )); mlsconstrain db_view { drop getattr setattr relabelfrom expand } - ( h1 dom h2 ); + (( h1 dom h2 ) or ( t1 != mcs_constrained_type )); mlsconstrain db_procedure { drop getattr setattr relabelfrom execute install entrypoint } - ( h1 dom h2 ); + (( h1 dom h2 ) or ( t1 != mcs_constrained_type )); mlsconstrain db_language { drop getattr setattr relabelfrom execute } - ( h1 dom h2 ); + (( h1 dom h2 ) or ( t1 != mcs_constrained_type )); mlsconstrain db_blob { drop getattr setattr relabelfrom read write import export } - ( h1 dom h2 ); + (( h1 dom h2 ) or ( t1 != mcs_constrained_type )); mlsconstrain { tcp_socket udp_socket rawip_socket } node_bind (( h1 dom h2 ) or ( t1 != mcs_constrained_type ));