From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 finch.gentoo.org (Postfix) with ESMTPS id 88BCA1580EB for ; Tue, 27 May 2025 19:47:38 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (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) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 6EE94343023 for ; Tue, 27 May 2025 19:47:38 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 64016110287; Tue, 27 May 2025 19:47:37 +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)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 59955110287 for ; Tue, 27 May 2025 19:47:37 +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 077E034301F for ; Tue, 27 May 2025 19:47:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9C0B728E9 for ; Tue, 27 May 2025 19:47:35 +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: <1748375239.356b8ae1e31f8ec2c53d67caf6ac37343a4ab767.concord@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/services/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/services/matrixd.fc X-VCS-Directories: policy/modules/services/ X-VCS-Committer: concord X-VCS-Committer-Name: Kenton Groombridge X-VCS-Revision: 356b8ae1e31f8ec2c53d67caf6ac37343a4ab767 X-VCS-Branch: master Date: Tue, 27 May 2025 19:47:35 +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: f966f05f-c252-467c-b5f2-5f7facff24e4 X-Archives-Hash: 5879ac9fa9d93e60a45a96203b17b281 commit: 356b8ae1e31f8ec2c53d67caf6ac37343a4ab767 Author: Rahul Sandhu gmail com> AuthorDate: Mon Apr 7 17:28:26 2025 +0000 Commit: Kenton Groombridge gentoo org> CommitDate: Tue May 27 19:47:19 2025 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=356b8ae1 matrixd: add filecon spec for gentoo configured builds Gentoo configures downstream[1][2] the configuration, log, and state directories to be different from the default upsteam. As this is a Gentoo modification, and not standard, gatekeep behind a build option for Gentoo. [1] https://github.com/gentoo/gentoo/blob/094aa9559b11be900f0e3b4fcd005d72ba774070/net-im/synapse/files/synapse.service#L12 [2] https://github.com/gentoo/gentoo/blob/094aa9559b11be900f0e3b4fcd005d72ba774070/net-im/synapse/files/synapse.service#L19 Signed-off-by: Rahul Sandhu gmail.com> Part-of: https://github.com/gentoo/hardened-refpolicy/pull/11 Closes: https://github.com/gentoo/hardened-refpolicy/pull/11 Signed-off-by: Kenton Groombridge gentoo.org> policy/modules/services/matrixd.fc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/policy/modules/services/matrixd.fc b/policy/modules/services/matrixd.fc index 6db2d7ed4..9fd5d986e 100644 --- a/policy/modules/services/matrixd.fc +++ b/policy/modules/services/matrixd.fc @@ -4,3 +4,10 @@ /var/lib/matrix-synapse(/.*)? gen_context(system_u:object_r:matrixd_var_t,s0) /var/log/matrix-synapse(/.*)? gen_context(system_u:object_r:matrixd_log_t,s0) + +ifdef(`distro_gentoo',` +/etc/synapse(/.*)? gen_context(system_u:object_r:matrixd_conf_t,s0) + +/var/lib/synapse(/.*)? gen_context(system_u:object_r:matrixd_var_t,s0) +/var/log/synapse(/.*)? gen_context(system_u:object_r:matrixd_log_t,s0) +')