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 723FEC433FE for ; Fri, 29 Oct 2021 21:13:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5417D60524 for ; Fri, 29 Oct 2021 21:13:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231562AbhJ2VPk (ORCPT ); Fri, 29 Oct 2021 17:15:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231270AbhJ2VPj (ORCPT ); Fri, 29 Oct 2021 17:15:39 -0400 Received: from yunyun.fuwafuwatime.moe (yunyun.fuwafuwatime.moe [IPv6:2604:180:2:42f::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFA68C061714 for ; Fri, 29 Oct 2021 14:13:10 -0700 (PDT) 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)) (No client certificate requested) by yunyun.fuwafuwatime.moe (Postfix) with ESMTPSA id 66C3FC3AC6 for ; Fri, 29 Oct 2021 17:04:56 -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 041388EF49; Fri, 29 Oct 2021 17:04:55 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=concord.sh; s=dkim; t=1635541495; 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=x1RU0JK4vHFi3xELQWQmCah/tB9ePB5HEaMKEziwD20=; b=REq4VhVNIJpIT6h6HXfQIQb61WzRzHLJSM1jakIHyXszVF/ENkrmXkiS24PSeY0TCmS9Ft js++irdeFP+bc2Jngkw5szC3Q/Gj3sPgMVTSEXaZ51OLGRBvDxykE2U5MBKTFLtHclef1K r90ECWRcVAyqlSxzkEJjQgyVKkT9Gub6gX3MJyJM+cmOZ4tI6Tw2+C02YpMEg11hzDVjUN eoIA+EGTvSaCpoQke0cVSzu6AWA/4HBm6JwqKPahMPimiKR0jtR8dc7ycnnkC8YQ8bt6sc /f/CTAGPKey5KK+THzuiE4x1zMjIvGuDYLgg12jBCxT73ojN4JoHhMWJIaVAww== From: Kenton Groombridge To: selinux-refpolicy@vger.kernel.org Cc: Kenton Groombridge Subject: [PATCH 5/7] mcs: combine single-level object creation constraints Date: Fri, 29 Oct 2021 17:04:41 -0400 Message-Id: <20211029210443.17461-6-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 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/policy/mcs b/policy/mcs index 6207b2734..54d06f292 100644 --- a/policy/mcs +++ b/policy/mcs @@ -91,7 +91,7 @@ mlsconstrain { lnk_file chr_file blk_file sock_file } { write setattr } # New filesystem object labels must be dominated by the relabeling subject # clearance, also the objects are single-level. -mlsconstrain file { create relabelto } +mlsconstrain { file lnk_file fifo_file } { create relabelto } ((( h1 dom h2 ) and ( l2 eq h2 )) or ( t1 != mcs_constrained_type )); @@ -99,9 +99,6 @@ 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