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 5C94A158087 for ; Sun, 30 Jan 2022 01:22:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6F72A2BC006; Sun, 30 Jan 2022 01:22:49 +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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2815F2BC003 for ; Sun, 30 Jan 2022 01:22:49 +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 8A7E234336B for ; Sun, 30 Jan 2022 01:22:46 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id ED0CE2B3 for ; Sun, 30 Jan 2022 01:22:44 +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: <1643505162.9a4bd55ce8206aae6be8fcba774d5659d9daf8ce.perfinion@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/services/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/services/container.te X-VCS-Directories: policy/modules/services/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: 9a4bd55ce8206aae6be8fcba774d5659d9daf8ce X-VCS-Branch: master Date: Sun, 30 Jan 2022 01:22:44 +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: b1c82d17-2917-43aa-81a4-903ee04d995d X-Archives-Hash: 13c4bda1ea834e78633b1d4f0edfea81 commit: 9a4bd55ce8206aae6be8fcba774d5659d9daf8ce Author: Kenton Groombridge concord sh> AuthorDate: Fri Dec 31 19:04:16 2021 +0000 Commit: Jason Zaman gentoo org> CommitDate: Sun Jan 30 01:12:42 2022 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=9a4bd55c container: allow containers to read read-only container files Signed-off-by: Kenton Groombridge concord.sh> Signed-off-by: Jason Zaman gentoo.org> policy/modules/services/container.te | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/policy/modules/services/container.te b/policy/modules/services/container.te index 483cdcb2..87ceaeda 100644 --- a/policy/modules/services/container.te +++ b/policy/modules/services/container.te @@ -137,6 +137,13 @@ rw_chr_files_pattern(container_domain, container_file_t, container_file_t) rw_blk_files_pattern(container_domain, container_file_t, container_file_t) allow container_domain container_file_t:dir_file_class_set watch; +allow container_domain container_ro_file_t:blk_file read_blk_file_perms; +allow container_domain container_ro_file_t:dir list_dir_perms; +allow container_domain container_ro_file_t:chr_file read_chr_file_perms; +allow container_domain container_ro_file_t:file { exec_file_perms read_file_perms }; +allow container_domain container_ro_file_t:lnk_file read_lnk_file_perms; +allow container_domain container_ro_file_t:sock_file read_sock_file_perms; + can_exec(container_domain, container_file_t) kernel_getattr_proc(container_domain)