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 5780313835A for ; Sat, 28 Nov 2020 23:09:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6F48EE0815; Sat, 28 Nov 2020 23:09:32 +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 499C6E0815 for ; Sat, 28 Nov 2020 23:09:32 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 2FD3434164C for ; Sat, 28 Nov 2020 23:09:31 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D7DB946F for ; Sat, 28 Nov 2020 23:09:29 +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: <1605517423.8fff7fea29cd303fb618520b0d792e6ee0cbf0a7.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/corosync.if policy/modules/services/pacemaker.te X-VCS-Directories: policy/modules/services/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: 8fff7fea29cd303fb618520b0d792e6ee0cbf0a7 X-VCS-Branch: master Date: Sat, 28 Nov 2020 23:09:29 +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: f3dd1353-f397-4789-b07e-40cdf1d21caf X-Archives-Hash: bb22e2979b682cb18d4e37a377365a59 commit: 8fff7fea29cd303fb618520b0d792e6ee0cbf0a7 Author: Dave Sugar tresys com> AuthorDate: Sat Sep 26 19:07:30 2020 +0000 Commit: Jason Zaman gentoo org> CommitDate: Mon Nov 16 09:03:43 2020 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=8fff7fea Allow pacemaker to map/read/write corosync shared memory files Sep 26 18:44:56 localhost audispd: node=virtual type=AVC msg=audit(1601145893.104:2915): avc: denied { read write } for pid=7173 comm="stonithd" name="qb-request-cmap-header" dev="tmpfs" ino=37263 scontext=system_u:system_r:pacemaker_t:s0 tcontext=system_u:object_r:corosync_tmpfs_t:s0 tclass=file permissive=1 Sep 26 18:44:56 localhost audispd: node=virtual type=AVC msg=audit(1601145893.104:2915): avc: denied { open } for pid=7173 comm="stonithd" path="/dev/shm/qb-7065-7173-28-i3gF6U/qb-request-cmap-header" dev="tmpfs" ino=37263 scontext=system_u:system_r:pacemaker_t:s0 tcontext=system_u:object_r:corosync_tmpfs_t:s0 tclass=file permissive=1 Sep 26 18:44:56 localhost audispd: node=virtual type=AVC msg=audit(1601145893.104:2916): avc: denied { map } for pid=7173 comm="stonithd" path="/dev/shm/qb-7065-7173-28-i3gF6U/qb-request-cmap-header" dev="tmpfs" ino=37263 scontext=system_u:system_r:pacemaker_t:s0 tcontext=system_u:object_r:corosync_tmpfs_t:s0 tclass=file permissive=1 Signed-off-by: Dave Sugar tresys.com> Signed-off-by: Jason Zaman gentoo.org> policy/modules/services/corosync.if | 19 +++++++++++++++++++ policy/modules/services/pacemaker.te | 1 + 2 files changed, 20 insertions(+) diff --git a/policy/modules/services/corosync.if b/policy/modules/services/corosync.if index f86dbed3..ee54bc9a 100644 --- a/policy/modules/services/corosync.if +++ b/policy/modules/services/corosync.if @@ -97,6 +97,25 @@ interface(`corosync_stream_connect',` stream_connect_pattern($1, corosync_runtime_t, corosync_runtime_t, corosync_t) ') +###################################### +## +## Memmap, read and write corosync tmpfs files. +## +## +## +## Domain allowed access. +## +## +# +interface(`corosync_mmap_rw_tmpfs',` + gen_require(` + type corosync_tmpfs_t; + ') + + fs_search_tmpfs($1) + mmap_rw_files_pattern($1, corosync_tmpfs_t, corosync_tmpfs_t) +') + ###################################### ## ## Read and write corosync tmpfs files. diff --git a/policy/modules/services/pacemaker.te b/policy/modules/services/pacemaker.te index 70d976ea..69d619a1 100644 --- a/policy/modules/services/pacemaker.te +++ b/policy/modules/services/pacemaker.te @@ -121,6 +121,7 @@ tunable_policy(`pacemaker_startstop_all_services',` optional_policy(` corosync_read_log(pacemaker_t) + corosync_mmap_rw_tmpfs(pacemaker_t) corosync_stream_connect(pacemaker_t) ')