From: "Kenton Groombridge" <concord@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/hardened-refpolicy:concord-dev commit in: policy/modules/contrib/
Date: Mon, 6 Jun 2022 15:15:47 +0000 (UTC) [thread overview]
Message-ID: <1654528512.da106dd4019e3b58af29eca5048e181cb2a61224.concord@gentoo> (raw)
Message-ID: <20220606151547.DBiAOinZOElQs_Jz3tmJ5W7SpPgF9jPsJ_EKQ9lMbJM@z> (raw)
commit: da106dd4019e3b58af29eca5048e181cb2a61224
Author: Kenton Groombridge <concord <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 12 01:27:06 2021 +0000
Commit: Kenton Groombridge <concord <AT> gentoo <DOT> org>
CommitDate: Mon Jun 6 15:15:12 2022 +0000
URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=da106dd4
phpfpm: various fixes and new tunables
Minor fixes for phpfpm and add several new tunables, primarily designed
to get various webapps working under SELinux.
Signed-off-by: Kenton Groombridge <concord <AT> gentoo.org>
policy/modules/contrib/phpfpm.te | 73 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 73 insertions(+)
diff --git a/policy/modules/contrib/phpfpm.te b/policy/modules/contrib/phpfpm.te
index cffae6d7..a1044f31 100644
--- a/policy/modules/contrib/phpfpm.te
+++ b/policy/modules/contrib/phpfpm.te
@@ -19,6 +19,49 @@ gen_tunable(phpfpm_use_ldap, false)
## </desc>
gen_tunable(phpfpm_send_syslog_msg, false)
+## <desc>
+## <p>
+## Allow phpfpm to execute shells. This
+## is needed by some webapps.
+## </p>
+## </desc>
+gen_tunable(phpfpm_exec_shell, false)
+
+## <desc>
+## <p>
+## Allow phpfpm to connect to http ports.
+## </p>
+## </desc>
+gen_tunable(phpfpm_connect_http, false)
+
+## <desc>
+## <p>
+## Allow phpfpm to connect to pop ports.
+## </p>
+## </desc>
+gen_tunable(phpfpm_connect_pop, false)
+
+## <desc>
+## <p>
+## Allow phpfpm to connect to redis ports.
+## </p>
+## </desc>
+gen_tunable(phpfpm_connect_redis, false)
+
+## <desc>
+## <p>
+## Allow phpfpm to connect to sieve ports.
+## </p>
+## </desc>
+gen_tunable(phpfpm_connect_sieve, false)
+
+## <desc>
+## <p>
+## Allow phpfpm to connect to smtp ports.
+## </p>
+## </desc>
+gen_tunable(phpfpm_connect_smtp, false)
+
type phpfpm_t;
type phpfpm_exec_t;
init_daemon_domain(phpfpm_t, phpfpm_exec_t)
@@ -44,6 +87,8 @@ allow phpfpm_t self:fifo_file rw_fifo_file_perms;
allow phpfpm_t self:tcp_socket rw_stream_socket_perms;
allow phpfpm_t self:udp_socket connected_socket_perms;
allow phpfpm_t self:unix_stream_socket { accept create_stream_socket_perms };
+allow phpfpm_t self:unix_dgram_socket { create_socket_perms };
+dontaudit phpfpm_t self:capability net_admin;
manage_files_pattern(phpfpm_t, phpfpm_log_t, phpfpm_log_t)
logging_log_filetrans(phpfpm_t, phpfpm_log_t, file)
@@ -86,6 +131,10 @@ apache_manage_all_rw_content(phpfpm_t)
apache_read_sys_content(phpfpm_t)
apache_dontaudit_search_modules(phpfpm_t)
+optional_policy(`
+ apache_map_sys_content(phpfpm_t)
+')
+
optional_policy(`
mysql_stream_connect(phpfpm_t)
mysql_tcp_connect(phpfpm_t)
@@ -106,6 +155,30 @@ optional_policy(`
')
')
+tunable_policy(`phpfpm_exec_shell',`
+ corecmd_exec_shell(phpfpm_t)
+')
+
+tunable_policy(`phpfpm_connect_http',`
+ corenet_tcp_connect_http_port(phpfpm_t)
+')
+
+tunable_policy(`phpfpm_connect_pop',`
+ corenet_tcp_connect_pop_port(phpfpm_t)
+')
+
+tunable_policy(`phpfpm_connect_redis',`
+ corenet_tcp_connect_redis_port(phpfpm_t)
+')
+
+tunable_policy(`phpfpm_connect_sieve',`
+ corenet_tcp_connect_sieve_port(phpfpm_t)
+')
+
+tunable_policy(`phpfpm_connect_smtp',`
+ corenet_tcp_connect_smtp_port(phpfpm_t)
+')
+
tunable_policy(`phpfpm_send_syslog_msg',`
logging_send_syslog_msg(phpfpm_t)
')
next reply other threads:[~2022-06-06 15:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-06 15:15 Kenton Groombridge [this message]
2022-06-06 15:15 ` [gentoo-commits] proj/hardened-refpolicy:concord-dev commit in: policy/modules/contrib/ Kenton Groombridge
-- strict thread matches above, loose matches on Subject: below --
2022-06-06 15:15 Kenton Groombridge
2022-06-06 15:15 ` [gentoo-commits] proj/hardened-refpolicy:various-20211111 " Kenton Groombridge
2022-06-06 15:13 Kenton Groombridge
2022-06-06 15:13 Kenton Groombridge
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=1654528512.da106dd4019e3b58af29eca5048e181cb2a61224.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