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 D54AC15808B for ; Sun, 27 Feb 2022 02:52:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 28357E09C0; Sun, 27 Feb 2022 02:52:36 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.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 12694E09C0 for ; Sun, 27 Feb 2022 02:52:36 +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 491DE3431D4 for ; Sun, 27 Feb 2022 02:52:35 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8B8992FC for ; Sun, 27 Feb 2022 02:52:33 +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: <1645927997.4b1f697b6a9ee59734e0cdf1067cc6d57a3b0799.perfinion@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/admin/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/admin/puppet.fc policy/modules/admin/puppet.te X-VCS-Directories: policy/modules/admin/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: 4b1f697b6a9ee59734e0cdf1067cc6d57a3b0799 X-VCS-Branch: master Date: Sun, 27 Feb 2022 02:52:33 +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: c14e1a00-ae1b-4149-9b6e-fae6463bd499 X-Archives-Hash: a9e66df19516b9db88532ba9ed9be3a8 commit: 4b1f697b6a9ee59734e0cdf1067cc6d57a3b0799 Author: Russell Coker coker com au> AuthorDate: Thu Feb 17 14:45:38 2022 +0000 Commit: Jason Zaman gentoo org> CommitDate: Sun Feb 27 02:13:17 2022 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=4b1f697b puppet V3 Removed the entrypoint stuff that was controversial, the rest should be fine. I think it's ready to merge. Signed-off-by: Russell Coker coker.com.au> Signed-off-by: Jason Zaman gentoo.org> policy/modules/admin/puppet.fc | 1 + policy/modules/admin/puppet.te | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/policy/modules/admin/puppet.fc b/policy/modules/admin/puppet.fc index f45bdc6a..001f21fe 100644 --- a/policy/modules/admin/puppet.fc +++ b/policy/modules/admin/puppet.fc @@ -11,6 +11,7 @@ /usr/sbin/puppetd -- gen_context(system_u:object_r:puppet_exec_t,s0) /usr/sbin/puppetmasterd -- gen_context(system_u:object_r:puppetmaster_exec_t,s0) +/var/cache/puppet(/.*)? gen_context(system_u:object_r:puppet_cache_t,s0) /var/lib/puppet(/.*)? gen_context(system_u:object_r:puppet_var_lib_t,s0) /var/log/puppet(/.*)? gen_context(system_u:object_r:puppet_log_t,s0) diff --git a/policy/modules/admin/puppet.te b/policy/modules/admin/puppet.te index 3d5a832b..7ef5ab83 100644 --- a/policy/modules/admin/puppet.te +++ b/policy/modules/admin/puppet.te @@ -36,6 +36,9 @@ init_daemon_runtime_file(puppet_runtime_t, dir, "puppet") type puppet_tmp_t; files_tmp_file(puppet_tmp_t) +type puppet_cache_t; +files_type(puppet_cache_t) + type puppet_var_lib_t; files_type(puppet_var_lib_t) @@ -74,6 +77,9 @@ manage_dirs_pattern(puppet_t, puppet_var_lib_t, puppet_var_lib_t) manage_files_pattern(puppet_t, puppet_var_lib_t, puppet_var_lib_t) can_exec(puppet_t, puppet_var_lib_t) +manage_dirs_pattern(puppet_t, puppet_cache_t, puppet_cache_t) +manage_files_pattern(puppet_t, puppet_cache_t, puppet_cache_t) + setattr_dirs_pattern(puppet_t, puppet_runtime_t, puppet_runtime_t) manage_files_pattern(puppet_t, puppet_runtime_t, puppet_runtime_t) files_runtime_filetrans(puppet_t, puppet_runtime_t, { file dir }) @@ -182,8 +188,6 @@ optional_policy(` ') optional_policy(` - files_rw_var_files(puppet_t) - rpm_domtrans(puppet_t) rpm_manage_db(puppet_t) rpm_manage_log(puppet_t) @@ -267,6 +271,7 @@ allow puppetmaster_t puppet_etc_t:lnk_file read_lnk_file_perms; allow puppetmaster_t puppet_log_t:dir setattr_dir_perms; append_files_pattern(puppetmaster_t, puppet_log_t, puppet_log_t) create_files_pattern(puppetmaster_t, puppet_log_t, puppet_log_t) +read_files_pattern(puppetmaster_t, puppet_log_t, puppet_log_t) setattr_files_pattern(puppetmaster_t, puppet_log_t, puppet_log_t) logging_log_filetrans(puppetmaster_t, puppet_log_t, { file dir })