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 7358F158020 for ; Wed, 2 Nov 2022 14:42:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3C920E0A60; Wed, 2 Nov 2022 14:42:56 +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 21B0AE0A60 for ; Wed, 2 Nov 2022 14:42:56 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4610C341015 for ; Wed, 2 Nov 2022 14:42:55 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 596FF710 for ; Wed, 2 Nov 2022 14:42:52 +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: <1667398034.44a2c3d605250b5c60034683bbcf5eaed59981d5.concord@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/glusterfs.if policy/modules/services/glusterfs.te X-VCS-Directories: policy/modules/services/ X-VCS-Committer: concord X-VCS-Committer-Name: Kenton Groombridge X-VCS-Revision: 44a2c3d605250b5c60034683bbcf5eaed59981d5 X-VCS-Branch: master Date: Wed, 2 Nov 2022 14:42:52 +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: a448cca7-5638-4eb9-b047-019a7e076427 X-Archives-Hash: a4935380ebb328fb73c8e1de8332a9f1 commit: 44a2c3d605250b5c60034683bbcf5eaed59981d5 Author: Kenton Groombridge concord sh> AuthorDate: Sat Sep 24 05:32:41 2022 +0000 Commit: Kenton Groombridge gentoo org> CommitDate: Wed Nov 2 14:07:14 2022 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=44a2c3d6 glusterfs: add type for gluster bricks Signed-off-by: Kenton Groombridge concord.sh> Signed-off-by: Kenton Groombridge gentoo.org> policy/modules/services/glusterfs.if | 6 +++++- policy/modules/services/glusterfs.te | 10 ++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/policy/modules/services/glusterfs.if b/policy/modules/services/glusterfs.if index b2b485ede..328818ad3 100644 --- a/policy/modules/services/glusterfs.if +++ b/policy/modules/services/glusterfs.if @@ -87,7 +87,7 @@ interface(`glusterfs_admin',` gen_require(` type glusterd_t, glusterd_initrc_exec_t, glusterd_log_t; type glusterd_tmp_t, glusterd_conf_t, glusterd_var_lib_t; - type glusterd_runtime_t; + type glusterd_runtime_t, glusterd_brick_t; ') glusterfs_run_daemon($1, $2) @@ -113,4 +113,8 @@ interface(`glusterfs_admin',` files_search_runtime($1) admin_pattern($1, glusterd_runtime_t) + + # searching var for /srv + files_search_var($1) + admin_pattern($1, glusterd_brick_t) ') diff --git a/policy/modules/services/glusterfs.te b/policy/modules/services/glusterfs.te index 2d94845d9..690aa828a 100644 --- a/policy/modules/services/glusterfs.te +++ b/policy/modules/services/glusterfs.te @@ -27,6 +27,9 @@ files_tmp_file(glusterd_tmp_t) type glusterd_var_lib_t; files_type(glusterd_var_lib_t) +type glusterd_brick_t; +files_type(glusterd_brick_t) + ######################################## # # Local policy @@ -64,6 +67,13 @@ manage_files_pattern(glusterd_t, glusterd_var_lib_t, glusterd_var_lib_t) manage_lnk_files_pattern(glusterd_t, glusterd_var_lib_t, glusterd_var_lib_t) files_var_lib_filetrans(glusterd_t, glusterd_var_lib_t, dir) +manage_dirs_pattern(glusterd_t, glusterd_brick_t, glusterd_brick_t) +manage_files_pattern(glusterd_t, glusterd_brick_t, glusterd_brick_t) +manage_chr_files_pattern(glusterd_t, glusterd_brick_t, glusterd_brick_t) +manage_fifo_files_pattern(glusterd_t, glusterd_brick_t, glusterd_brick_t) +manage_lnk_files_pattern(glusterd_t, glusterd_brick_t, glusterd_brick_t) +manage_sock_files_pattern(glusterd_t, glusterd_brick_t, glusterd_brick_t) + can_exec(glusterd_t, glusterd_exec_t) corenet_all_recvfrom_netlabel(glusterd_t)