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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id EE6B9138359 for ; Tue, 13 Oct 2020 03:02:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 43136E0845; Tue, 13 Oct 2020 03:02:09 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2B1EEE0841 for ; Tue, 13 Oct 2020 03:02:09 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1B4673409EC for ; Tue, 13 Oct 2020 03:02:08 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5E5BB3A6 for ; Tue, 13 Oct 2020 03:02:05 +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: <1602450466.7e809e87c1da6253cba08a8d8603f78be8b52b64.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/sysnetwork.te X-VCS-Directories: policy/modules/system/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: 7e809e87c1da6253cba08a8d8603f78be8b52b64 X-VCS-Branch: master Date: Tue, 13 Oct 2020 03:02:05 +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: 43a1b86e-953d-4d53-9b2b-3da25612824e X-Archives-Hash: 6f5990987a49ac55ac5955abcd0eaf0c commit: 7e809e87c1da6253cba08a8d8603f78be8b52b64 Author: Yi Zhao windriver com> AuthorDate: Tue Sep 15 02:57:58 2020 +0000 Commit: Jason Zaman gentoo org> CommitDate: Sun Oct 11 21:07:46 2020 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=7e809e87 sysnet: allow dhcpcd to create socket file The dhcpcd needs to create socket file under /run/dhcpcd directory. Fixes: AVC avc: denied { create } for pid=331 comm="dhcpcd" name="eth0.sock" scontext=system_u:system_r:dhcpc_t:s0-s15:c0.c1023 tcontext=system_u:object_r:dhcpc_runtime_t:s0 tclass=sock_file permissive=0 AVC avc: denied { setattr } for pid=331 comm="dhcpcd" name="eth0.sock" dev="tmpfs" ino=19153 scontext=system_u:system_r:dhcpc_t:s0-s15:c0.c1023 tcontext=system_u:object_r:dhcpc_runtime_t:s0 tclass=sock_file permissive=0 AVC avc: denied { sendto } for pid=331 comm="dhcpcd" scontext=system_u:system_r:dhcpc_t:s0-s15:c0.c1023 tcontext=system_u:system_r:dhcpc_t:s0-s15:c0.c1023 tclass=unix_dgram_socket permissive=0 Signed-off-by: Yi Zhao windriver.com> Signed-off-by: Jason Zaman gentoo.org> policy/modules/system/sysnetwork.te | 2 ++ 1 file changed, 2 insertions(+) diff --git a/policy/modules/system/sysnetwork.te b/policy/modules/system/sysnetwork.te index 83389037..9099802e 100644 --- a/policy/modules/system/sysnetwork.te +++ b/policy/modules/system/sysnetwork.te @@ -62,6 +62,7 @@ allow dhcpc_t self:packet_socket create_socket_perms; allow dhcpc_t self:netlink_generic_socket create_socket_perms; allow dhcpc_t self:netlink_route_socket create_netlink_socket_perms; allow dhcpc_t self:rawip_socket create_socket_perms; +allow dhcpc_t self:unix_dgram_socket { create_socket_perms sendto }; allow dhcpc_t dhcp_etc_t:dir list_dir_perms; read_lnk_files_pattern(dhcpc_t, dhcp_etc_t, dhcp_etc_t) @@ -74,6 +75,7 @@ allow dhcpc_t dhcpc_state_t:file map; # create pid file manage_files_pattern(dhcpc_t, dhcpc_runtime_t, dhcpc_runtime_t) +manage_sock_files_pattern(dhcpc_t, dhcpc_runtime_t, dhcpc_runtime_t) create_dirs_pattern(dhcpc_t, dhcpc_runtime_t, dhcpc_runtime_t) # Create /var/run/dhcpc directory (state directory), needed for /run/dhcpc # Gets done through the dhcpcd-hooks