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 31A6B158089 for ; Fri, 20 Oct 2023 22:06:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 71D6E2BC0B6; Fri, 20 Oct 2023 22:06:00 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 597A02BC0B6 for ; Fri, 20 Oct 2023 22:06:00 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 99BBF335CAF for ; Fri, 20 Oct 2023 22:05:59 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0F88A1149 for ; Fri, 20 Oct 2023 22:05:58 +0000 (UTC) From: "Kenton Groombridge" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Kenton Groombridge" Message-ID: <1697837319.4bb6b12fe1a936a0db91fc133ca30dfd8e5be32a.concord@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/system/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/system/systemd.if X-VCS-Directories: policy/modules/system/ X-VCS-Committer: concord X-VCS-Committer-Name: Kenton Groombridge X-VCS-Revision: 4bb6b12fe1a936a0db91fc133ca30dfd8e5be32a X-VCS-Branch: master Date: Fri, 20 Oct 2023 22:05:58 +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: 412ec546-8a22-443f-9cec-aeb1086a8f7b X-Archives-Hash: d6e0129b8c2d92f35c15d95486f2a3b5 commit: 4bb6b12fe1a936a0db91fc133ca30dfd8e5be32a Author: Dave Sugar gmail com> AuthorDate: Wed Oct 4 23:28:38 2023 +0000 Commit: Kenton Groombridge gentoo org> CommitDate: Fri Oct 20 21:28:39 2023 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=4bb6b12f Use interface that already exists. Signed-off-by: Dave Sugar gmail.com> Signed-off-by: Kenton Groombridge gentoo.org> policy/modules/system/systemd.if | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/policy/modules/system/systemd.if b/policy/modules/system/systemd.if index 68fb1a148..6054b5038 100644 --- a/policy/modules/system/systemd.if +++ b/policy/modules/system/systemd.if @@ -29,7 +29,6 @@ template(`systemd_role_template',` type systemd_user_runtime_t, systemd_user_runtime_notify_t; type systemd_user_unit_t; type systemd_user_runtime_unit_t, systemd_user_transient_unit_t; - type systemd_machined_t; ') ################################# @@ -151,10 +150,9 @@ template(`systemd_role_template',` allow $3 systemd_user_runtime_t:sock_file { manage_sock_file_perms relabel_sock_file_perms }; # for "machinectl shell" - allow $1_systemd_t systemd_machined_t:fd use; - allow $3 systemd_machined_t:fd use; - allow $3 systemd_machined_t:dbus send_msg; - allow systemd_machined_t $3:dbus send_msg; + systemd_use_inherited_machined_ptys($1_systemd_t) + systemd_use_inherited_machined_ptys($3) + systemd_dbus_chat_machined($3) allow $3 systemd_user_runtime_notify_t:sock_file { manage_sock_file_perms relabel_sock_file_perms };