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 2071815802F for ; Fri, 31 Mar 2023 23:07:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D03A0E08C3; Fri, 31 Mar 2023 23:07:14 +0000 (UTC) Received: from smtp.gentoo.org (dev.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 B49A3E089F for ; Fri, 31 Mar 2023 23:07:14 +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 D9383340FBB for ; Fri, 31 Mar 2023 23:07:13 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2EE03A20 for ; Fri, 31 Mar 2023 23:07:11 +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: <1680282692.8cdb1e582a7c164d6a0f6b39aa3f819eb8d5fc1b.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.te X-VCS-Directories: policy/modules/system/ X-VCS-Committer: concord X-VCS-Committer-Name: Kenton Groombridge X-VCS-Revision: 8cdb1e582a7c164d6a0f6b39aa3f819eb8d5fc1b X-VCS-Branch: master Date: Fri, 31 Mar 2023 23:07:11 +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: 0704deb0-8008-4475-b96e-94a20ec93e66 X-Archives-Hash: dc377c380d6e085e4f49ceac219c3fc9 commit: 8cdb1e582a7c164d6a0f6b39aa3f819eb8d5fc1b Author: Kenton Groombridge concord sh> AuthorDate: Mon Mar 6 23:20:57 2023 +0000 Commit: Kenton Groombridge gentoo org> CommitDate: Fri Mar 31 17:11:32 2023 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=8cdb1e58 systemd: add rules for systemd-zram-generator Signed-off-by: Kenton Groombridge concord.sh> Signed-off-by: Kenton Groombridge gentoo.org> policy/modules/system/systemd.te | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/policy/modules/system/systemd.te b/policy/modules/system/systemd.te index 59a3fcfc5..030dcbd67 100644 --- a/policy/modules/system/systemd.te +++ b/policy/modules/system/systemd.te @@ -481,8 +481,8 @@ seutil_search_default_contexts(systemd_coredump_t) # allow systemd_generator_t self:fifo_file rw_fifo_file_perms; -allow systemd_generator_t self:capability { dac_override sys_admin }; -allow systemd_generator_t self:process { getsched setfscreate signal }; +allow systemd_generator_t self:capability { dac_override sys_admin sys_resource }; +allow systemd_generator_t self:process { getcap getsched setfscreate signal }; corecmd_exec_shell(systemd_generator_t) corecmd_exec_bin(systemd_generator_t) @@ -491,6 +491,8 @@ dev_read_sysfs(systemd_generator_t) dev_write_kmsg(systemd_generator_t) dev_write_sysfs_dirs(systemd_generator_t) dev_read_urand(systemd_generator_t) +dev_create_sysfs_files(systemd_generator_t) +dev_write_sysfs(systemd_generator_t) files_read_etc_files(systemd_generator_t) files_read_etc_runtime_files(systemd_generator_t) @@ -526,7 +528,8 @@ kernel_dontaudit_getattr_proc(systemd_generator_t) # Where an unlabeled mountpoint is encounted: kernel_dontaudit_search_unlabeled(systemd_generator_t) -storage_raw_read_fixed_disk(systemd_generator_t) +# write for systemd-zram-generator +storage_raw_rw_fixed_disk(systemd_generator_t) storage_raw_read_removable_device(systemd_generator_t) # needed to resolve hostnames for NFS mounts