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 8E62C158020 for ; Wed, 2 Nov 2022 14:42:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C42AEE0930; Wed, 2 Nov 2022 14:42:53 +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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A95D3E0930 for ; Wed, 2 Nov 2022 14:42:53 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CFBAF340D19 for ; Wed, 2 Nov 2022 14:42:52 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 38B615EE for ; Wed, 2 Nov 2022 14:42:51 +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: <1667398009.c307ecefdf832e0c77ea2ffce048b4818f7a09ec.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/sysnetwork.if X-VCS-Directories: policy/modules/system/ X-VCS-Committer: concord X-VCS-Committer-Name: Kenton Groombridge X-VCS-Revision: c307ecefdf832e0c77ea2ffce048b4818f7a09ec X-VCS-Branch: master Date: Wed, 2 Nov 2022 14:42:51 +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: f1cb4255-af36-4811-883c-0df135be063a X-Archives-Hash: 82302fa4825cdbe7ac981afe85456073 commit: c307ecefdf832e0c77ea2ffce048b4818f7a09ec Author: Yi Zhao windriver com> AuthorDate: Wed Jul 8 06:38:55 2020 +0000 Commit: Kenton Groombridge gentoo org> CommitDate: Wed Nov 2 14:06:49 2022 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=c307ecef sysnetwork: allow systemd_networkd_t to read link file Per https://systemd.network/systemd.network.html, we can create a symlink pointing to /dev/null for systemd network configuration file. For example: $ ls -l /etc/systemd/network/80-wired.network lrwxrwxrwx. 1 root root 9 Mar 9 2022 /etc/systemd/network/80-wired.network -> /dev/null Fixes: avc: denied { read } for pid=211 comm="systemd-network" name="80-wired.network" dev="vda" ino=1477 scontext=system_u:system_r:systemd_networkd_t:s0-s15:c0.c1023 tcontext=system_u:object_r:net_conf_t:s0 tclass=lnk_file permissive=0 systemd-networkd[211]: Failed to load /etc/systemd/network/80-wired.network, ignoring: Permission denied Signed-off-by: Yi Zhao windriver.com> Signed-off-by: Kenton Groombridge gentoo.org> policy/modules/system/sysnetwork.if | 1 + 1 file changed, 1 insertion(+) diff --git a/policy/modules/system/sysnetwork.if b/policy/modules/system/sysnetwork.if index 2598c7adc..77c175970 100644 --- a/policy/modules/system/sysnetwork.if +++ b/policy/modules/system/sysnetwork.if @@ -349,6 +349,7 @@ interface(`sysnet_read_config',` files_search_runtime($1) allow $1 net_conf_t:dir list_dir_perms; allow $1 net_conf_t:file read_file_perms; + allow $1 net_conf_t:lnk_file read_lnk_file_perms; ifdef(`distro_debian',` files_search_runtime($1)