Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A52EC43219 for ; Fri, 29 Oct 2021 21:13:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3319660524 for ; Fri, 29 Oct 2021 21:13:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230302AbhJ2VPl (ORCPT ); Fri, 29 Oct 2021 17:15:41 -0400 Received: from yunyun.fuwafuwatime.moe ([107.191.99.165]:33198 "EHLO yunyun.fuwafuwatime.moe" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231565AbhJ2VPk (ORCPT ); Fri, 29 Oct 2021 17:15:40 -0400 Received: from megumin.fuwafuwatime.moe (c-174-50-100-124.hsd1.ga.comcast.net [174.50.100.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by yunyun.fuwafuwatime.moe (Postfix) with ESMTPSA id BDE7BC3AC2 for ; Fri, 29 Oct 2021 17:04:55 -0400 (EDT) Received: from bubbles.localdomain (bubbles.localdomain [192.168.1.122]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by megumin.fuwafuwatime.moe (Postfix) with ESMTPSA id 6D88D8EF3C; Fri, 29 Oct 2021 17:04:54 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=concord.sh; s=dkim; t=1635541494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1Hp4vOyKMcVcdzzFIBiddIksK0L5ORzn/wQECAvDfQ0=; b=WHPEeul3qeX8wF2G5QlHP0QOekz8iVrjkF3PvinafCNo8oka2gdIsURf/KPQEwmIUIxAUV uU/quxAnirIIMGHVe5Srmqfyt7n2nSYAQMFchDi+qhcId2NH8WsW/U6txE5BwLyRWwm9kd 0Nuz8dRyLhKmus7t3z8VLUb0MLpAd/i8WmE4Wv9K8wVvUXM/5iGKGXkhWmHHGJ0iZWq4NY JRN4XPch617N2HNGt67h+8AN3C3ZEw87MxQjX9zxMqFZiW49lmf5RwTcVvLCmKlcFnPZCe 7Os1hHwbpzotEdJWsVxGtA934r6MMsigO4sIgPFlyRVUV2YT7HCFfSec9LKlMQ== From: Kenton Groombridge To: selinux-refpolicy@vger.kernel.org Cc: Kenton Groombridge Subject: [PATCH 2/7] mcs: restrict create, relabelto on mcs files Date: Fri, 29 Oct 2021 17:04:38 -0400 Message-Id: <20211029210443.17461-3-me@concord.sh> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211029210443.17461-1-me@concord.sh> References: <20211029210443.17461-1-me@concord.sh> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Authentication-Results: ORIGINATING; auth=pass smtp.auth=me@concord.sh smtp.mailfrom=me@concord.sh Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org Signed-off-by: Kenton Groombridge --- policy/mcs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/policy/mcs b/policy/mcs index 44b57e594..d4d984e47 100644 --- a/policy/mcs +++ b/policy/mcs @@ -99,6 +99,9 @@ mlsconstrain file { create relabelto } mlsconstrain { dir file lnk_file chr_file blk_file sock_file fifo_file } { relabelfrom } (( h1 dom h2 ) or ( t1 != mcs_constrained_type )); +mlsconstrain { file lnk_file fifo_file } { create relabelto } + (( l2 eq h2 ) or ( t1 != mcs_constrained_type )); + mlsconstrain { dir file lnk_file chr_file blk_file sock_file fifo_file } { create relabelto } (( h1 dom h2 ) or ( t1 != mcs_constrained_type )); -- 2.33.1