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 (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CF7351580FD for ; Sun, 15 Dec 2024 00:30:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 267D8E09BC; Sun, 15 Dec 2024 00:30:19 +0000 (UTC) Received: from smtp.gentoo.org (mail.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 pigeon.gentoo.org (Postfix) with ESMTPS id 0CB55E09C0 for ; Sun, 15 Dec 2024 00:30:19 +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 4D79A34106C for ; Sun, 15 Dec 2024 00:30:18 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 802DC1F45 for ; Sun, 15 Dec 2024 00:30:15 +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: <1734221959.716e9b6d402bdb400679019d455f2da5a69e33d5.perfinion@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.te X-VCS-Directories: policy/modules/system/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: 716e9b6d402bdb400679019d455f2da5a69e33d5 X-VCS-Branch: master Date: Sun, 15 Dec 2024 00:30:15 +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: cf4e96c4-0c90-4ce9-94d4-1b2a4f30a059 X-Archives-Hash: 3f0e11396091ea295f5c3683dc1312fb commit: 716e9b6d402bdb400679019d455f2da5a69e33d5 Author: Rahul Sandhu sandhuservices dev> AuthorDate: Thu Nov 28 01:49:27 2024 +0000 Commit: Jason Zaman gentoo org> CommitDate: Sun Dec 15 00:19:19 2024 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=716e9b6d systemd_homed_t, systemd_homework_t: allow reading of /etc/machine-id systemd-homed user records stored in identity files are machine-id specific and signed, so systemd-homed needs access to /etc/machine-id to create those records properly. Signed-off-by: Rahul Sandhu sandhuservices.dev> Signed-off-by: Jason Zaman gentoo.org> policy/modules/system/systemd.te | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/policy/modules/system/systemd.te b/policy/modules/system/systemd.te index 309f99ae4..dca7f098d 100644 --- a/policy/modules/system/systemd.te +++ b/policy/modules/system/systemd.te @@ -679,6 +679,9 @@ allow systemd_homed_t systemd_homed_var_lib_t:dir manage_dir_perms; allow systemd_homed_t systemd_homed_var_lib_t:file manage_file_perms; init_var_lib_filetrans(systemd_homed_t, systemd_homed_var_lib_t, dir) +# read /etc/machine-id +files_read_etc_runtime(systemd_homed_t) + # Entries such as /sys/devices/virtual/block/loop1/uevent: dev_read_sysfs(systemd_homed_t) @@ -729,6 +732,9 @@ allow systemd_homework_t systemd_homed_runtime_t:dir manage_dir_perms; files_runtime_filetrans(systemd_homework_t, systemd_homed_runtime_t, file) init_runtime_filetrans(systemd_homework_t, systemd_homed_runtime_t, dir) +# read /etc/machine-id +files_read_etc_runtime(systemd_homework_t) + # mount on /run/systemd/user-home-mount allow systemd_homework_t systemd_homed_runtime_t:dir mounton;