From: "Kenton Groombridge" <concord@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/system/, policy/modules/services/
Date: Wed, 2 Nov 2022 14:42:52 +0000 (UTC) [thread overview]
Message-ID: <1667398037.95006bc2eacf58bf5d47246f7e431aa4ea6f64a1.concord@gentoo> (raw)
commit: 95006bc2eacf58bf5d47246f7e431aa4ea6f64a1
Author: Kenton Groombridge <me <AT> concord <DOT> sh>
AuthorDate: Sat Sep 24 17:05:00 2022 +0000
Commit: Kenton Groombridge <concord <AT> gentoo <DOT> org>
CommitDate: Wed Nov 2 14:07:17 2022 +0000
URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=95006bc2
selinuxutil: allow semanage, setfiles to inherit gluster fds
The Gluster daemon uses a hook which adds a file context for gluster
bricks when they are created via the use of 'semanage fcontex -a'.
Signed-off-by: Kenton Groombridge <me <AT> concord.sh>
Signed-off-by: Kenton Groombridge <concord <AT> gentoo.org>
policy/modules/services/glusterfs.if | 18 ++++++++++++++++++
policy/modules/system/selinuxutil.te | 9 +++++++++
2 files changed, 27 insertions(+)
diff --git a/policy/modules/services/glusterfs.if b/policy/modules/services/glusterfs.if
index 328818ad3..5e6af0ecc 100644
--- a/policy/modules/services/glusterfs.if
+++ b/policy/modules/services/glusterfs.if
@@ -66,6 +66,24 @@ interface(`glusterfs_stream_connect_daemon',`
allow $1 glusterd_runtime_t:sock_file read_sock_file_perms;
')
+########################################
+## <summary>
+## Inherit and use glusterd file descriptors.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`glusterfs_use_daemon_fds',`
+ gen_require(`
+ type glusterd_t;
+ ')
+
+ allow $1 glusterd_t:fd use;
+')
+
########################################
## <summary>
## All of the rules required to
diff --git a/policy/modules/system/selinuxutil.te b/policy/modules/system/selinuxutil.te
index d3678246a..14a17175f 100644
--- a/policy/modules/system/selinuxutil.te
+++ b/policy/modules/system/selinuxutil.te
@@ -208,6 +208,11 @@ ifdef(`distro_ubuntu',`
')
')
+optional_policy(`
+ # glusterd calls semanage fcontext
+ glusterfs_use_daemon_fds(load_policy_t)
+')
+
optional_policy(`
portage_dontaudit_use_fds(load_policy_t)
')
@@ -693,6 +698,10 @@ optional_policy(`
apt_use_fds(setfiles_t)
')
+optional_policy(`
+ glusterfs_use_daemon_fds(setfiles_t)
+')
+
optional_policy(`
# leaked file descriptors
udev_dontaudit_rw_dgram_sockets(setfiles_t)
next reply other threads:[~2022-11-02 14:42 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-02 14:42 Kenton Groombridge [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-12-15 0:30 [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/system/, policy/modules/services/ Jason Zaman
2024-09-22 0:03 Jason Zaman
2024-05-14 19:42 Kenton Groombridge
2024-05-14 19:42 Kenton Groombridge
2024-05-14 19:42 Kenton Groombridge
2023-10-06 16:44 Kenton Groombridge
2023-10-06 16:44 Kenton Groombridge
2022-04-09 19:28 Jason Zaman
2022-02-27 2:52 Jason Zaman
2022-02-07 2:14 Jason Zaman
2022-01-30 1:22 Jason Zaman
2021-11-11 21:27 Jason Zaman
2021-09-05 16:00 Jason Zaman
2021-02-07 3:20 Jason Zaman
2021-02-07 3:20 Jason Zaman
2018-12-09 11:48 Jason Zaman
2018-11-11 23:29 Jason Zaman
2018-11-11 23:29 Jason Zaman
2017-01-01 16:36 Jason Zaman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1667398037.95006bc2eacf58bf5d47246f7e431aa4ea6f64a1.concord@gentoo \
--to=concord@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox