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 BD0DE158020 for ; Tue, 13 Dec 2022 20:55:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E7BCDE0886; Tue, 13 Dec 2022 20:55:12 +0000 (UTC) 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 pigeon.gentoo.org (Postfix) with ESMTPS id CC67BE0886 for ; Tue, 13 Dec 2022 20:55:12 +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 C1B90340C7B for ; Tue, 13 Dec 2022 20:55:11 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5923A77D for ; Tue, 13 Dec 2022 20:55:10 +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: <1670958262.83951ea02202a7998db13df6e6418dd587092678.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/udev.te X-VCS-Directories: policy/modules/system/ X-VCS-Committer: concord X-VCS-Committer-Name: Kenton Groombridge X-VCS-Revision: 83951ea02202a7998db13df6e6418dd587092678 X-VCS-Branch: master Date: Tue, 13 Dec 2022 20:55:10 +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: 1f4a0069-d651-4db4-b047-749ecf6a3ddd X-Archives-Hash: 3c9a6d15cd03a9709138aab635b2499d commit: 83951ea02202a7998db13df6e6418dd587092678 Author: Corentin LABBE gmail com> AuthorDate: Thu Dec 1 06:30:48 2022 +0000 Commit: Kenton Groombridge gentoo org> CommitDate: Tue Dec 13 19:04:22 2022 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=83951ea0 udev: permit to read hwdb On a gentoo with openRC, udev is denied to read hwdb. On current policy, reading hwdb is only allowed for system with systemd. In fact it is a common action (beyond openrc/systemd) so rules for reading it must be global. Signed-off-by: Corentin LABBE gmail.com> Signed-off-by: Kenton Groombridge gentoo.org> policy/modules/system/udev.te | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/policy/modules/system/udev.te b/policy/modules/system/udev.te index 8f79de24d..56cfa2fb8 100644 --- a/policy/modules/system/udev.te +++ b/policy/modules/system/udev.te @@ -201,6 +201,9 @@ sysnet_signal_dhcpc(udev_t) sysnet_manage_config(udev_t) sysnet_etc_filetrans_config(udev_t) +systemd_map_hwdb(udev_t) +systemd_read_hwdb(udev_t) + userdom_dontaudit_getattr_user_home_dirs(udev_t) userdom_dontaudit_search_user_home_content(udev_t) @@ -265,8 +268,6 @@ ifdef(`init_systemd',` init_stream_connect(udev_t) init_start_system(udev_t) - systemd_map_hwdb(udev_t) - systemd_read_hwdb(udev_t) systemd_read_logind_sessions_files(udev_t) systemd_read_logind_runtime_files(udev_t) # udev searches for .link files and applies custom udev rules