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 9AF1513835A for ; Mon, 11 Jan 2021 01:27:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CA26FE0AD9; Mon, 11 Jan 2021 01:27:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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 B56D9E0AD9 for ; Mon, 11 Jan 2021 01:27:11 +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 02584341075 for ; Mon, 11 Jan 2021 01:27:11 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 631DE4AA for ; Mon, 11 Jan 2021 01:27:07 +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: <1610315537.c0ba07217cbd68700912a61da9298aa029c371c7.perfinion@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/services/, policy/modules/kernel/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/kernel/kernel.te policy/modules/services/xserver.te X-VCS-Directories: policy/modules/services/ policy/modules/kernel/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: c0ba07217cbd68700912a61da9298aa029c371c7 X-VCS-Branch: master Date: Mon, 11 Jan 2021 01:27:07 +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: faec2bae-375f-465c-a930-5b0f656c439c X-Archives-Hash: 5543a38a84db2a774e98b066ab58d41d commit: c0ba07217cbd68700912a61da9298aa029c371c7 Author: Daniel Burgener linux microsoft com> AuthorDate: Tue Dec 15 15:29:52 2020 +0000 Commit: Jason Zaman gentoo org> CommitDate: Sun Jan 10 21:52:17 2021 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=c0ba0721 Use self keyword when an AV rule source type matches destination This is reported in a new SELint check in soon to be released selint version 1.2.0 Signed-off-by: Daniel Burgener linux.microsoft.com> Signed-off-by: Jason Zaman gentoo.org> policy/modules/kernel/kernel.te | 2 +- policy/modules/services/xserver.te | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/policy/modules/kernel/kernel.te b/policy/modules/kernel/kernel.te index 8a7c39df..9b847078 100644 --- a/policy/modules/kernel/kernel.te +++ b/policy/modules/kernel/kernel.te @@ -263,7 +263,7 @@ kernel_mounton_proc_dirs(kernel_t) kernel_request_load_module(kernel_t) # Allow unlabeled network traffic -allow unlabeled_t unlabeled_t:packet { forward_in forward_out }; +allow unlabeled_t self:packet { forward_in forward_out }; corenet_in_generic_if(unlabeled_t) corenet_in_generic_node(unlabeled_t) diff --git a/policy/modules/services/xserver.te b/policy/modules/services/xserver.te index b380e583..e56dcac9 100644 --- a/policy/modules/services/xserver.te +++ b/policy/modules/services/xserver.te @@ -787,9 +787,9 @@ tunable_policy(`!xserver_object_manager',` # should be xserver_unconfined(xserver_t), # but typeattribute doesnt work in conditionals - allow xserver_t xserver_t:x_server { getattr setattr record debug grab manage }; + allow xserver_t self:x_server { getattr setattr record debug grab manage }; allow xserver_t { x_domain root_xdrawable_t }:x_drawable { create destroy read write blend getattr setattr list_child add_child remove_child list_property get_property set_property manage override show hide send receive }; - allow xserver_t xserver_t:x_screen { getattr setattr hide_cursor show_cursor saver_getattr saver_setattr saver_hide saver_show }; + allow xserver_t self:x_screen { getattr setattr hide_cursor show_cursor saver_getattr saver_setattr saver_hide saver_show }; allow xserver_t x_domain:x_gc { create destroy getattr setattr use }; allow xserver_t { x_domain root_xcolormap_t }:x_colormap { create destroy read write getattr add_color remove_color install uninstall use }; allow xserver_t xproperty_type:x_property { create destroy read write append getattr setattr };