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 4E2A41396D0 for ; Sun, 10 Sep 2017 14:04:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6CC631FC115; Sun, 10 Sep 2017 14:04:00 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 4A0A01FC114 for ; Sun, 10 Sep 2017 14:04:00 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 989BE341803 for ; Sun, 10 Sep 2017 14:03:59 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6D66D908E for ; Sun, 10 Sep 2017 14:03:55 +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: <1505051610.409546eda11ca6d9d54367516c725b3ba5d890c2.perfinion@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:next commit in: policy/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/mcs policy/mls X-VCS-Directories: policy/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: 409546eda11ca6d9d54367516c725b3ba5d890c2 X-VCS-Branch: next Date: Sun, 10 Sep 2017 14:03:55 +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-Archives-Salt: 61ba29f3-4087-413a-913c-e5b055022552 X-Archives-Hash: 56775cae627a51a0862086550a54b296 commit: 409546eda11ca6d9d54367516c725b3ba5d890c2 Author: Jason Zaman perfinion com> AuthorDate: Fri Feb 10 16:26:10 2017 +0000 Commit: Jason Zaman gentoo org> CommitDate: Sun Sep 10 13:53:30 2017 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=409546ed mls mcs: Add constraints for key class Taken from fedoras policy https://github.com/fedora-selinux/selinux-policy/blob/rawhide-base/policy/mls https://github.com/fedora-selinux/selinux-policy/blob/rawhide-base/policy/mcs policy/mcs | 3 +++ policy/mls | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/policy/mcs b/policy/mcs index 4d030112..94319570 100644 --- a/policy/mcs +++ b/policy/mcs @@ -123,6 +123,9 @@ mlsconstrain process { signal } mlsconstrain { tcp_socket udp_socket rawip_socket } node_bind (( h1 dom h2 ) or ( t1 != mcs_constrained_type )); +mlsconstrain key { create link read search setattr view write } + (( h1 dom h2 ) or ( t1 != mcs_constrained_type )); + # # MCS policy for SELinux-enabled databases # diff --git a/policy/mls b/policy/mls index 69ca7263..c9be3125 100644 --- a/policy/mls +++ b/policy/mls @@ -281,6 +281,14 @@ mlsconstrain msg send # { ipc sem msgq shm } associate +# +# MLS policy for the key class +# + +mlsconstrain key { create link read search setattr view write } + (( l1 eq l2 ) or + (( t1 == mlsprocwritetoclr ) and ( h1 dom l2 ) and ( l1 domby l2 )) or + ( t1 == mlsprocwrite )); #