* [gentoo-commits] proj/hardened-refpolicy:various-20211111 commit in: policy/modules/contrib/
@ 2022-06-06 15:13 Kenton Groombridge
0 siblings, 0 replies; 5+ messages in thread
From: Kenton Groombridge @ 2022-06-06 15:13 UTC (permalink / raw
To: gentoo-commits
commit: 822b048c53c7b0362a74333fba24a151569be6bc
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:13:08 2022 +0000
URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=822b048c
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 <me <AT> concord.sh>
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)
')
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] proj/hardened-refpolicy:various-20211111 commit in: policy/modules/contrib/
@ 2022-06-06 15:13 Kenton Groombridge
0 siblings, 0 replies; 5+ messages in thread
From: Kenton Groombridge @ 2022-06-06 15:13 UTC (permalink / raw
To: gentoo-commits
commit: 7c566c428891f598517ef92a5feda42d5bced030
Author: Kenton Groombridge <concord <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 12 01:24:50 2021 +0000
Commit: Kenton Groombridge <concord <AT> gentoo <DOT> org>
CommitDate: Mon Jun 6 15:13:05 2022 +0000
URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=7c566c42
nginx: various fixes
Various fixes for nginx, and also allow nginx to list and read user home
content given that the httpd_read_user_content boolean is enabled.
Signed-off-by: Kenton Groombridge <me <AT> concord.sh>
policy/modules/contrib/nginx.te | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/policy/modules/contrib/nginx.te b/policy/modules/contrib/nginx.te
index 57e8ceb9..0c935bb6 100644
--- a/policy/modules/contrib/nginx.te
+++ b/policy/modules/contrib/nginx.te
@@ -119,8 +119,13 @@ domain_use_interactive_fds(nginx_t)
files_read_etc_files(nginx_t)
+auth_use_nsswitch(nginx_t)
+logging_send_syslog_msg(nginx_t)
+
+miscfiles_read_generic_certs(nginx_t)
miscfiles_read_localization(nginx_t)
+
sysnet_dns_name_resolve(nginx_t)
optional_policy(`
@@ -129,10 +134,16 @@ optional_policy(`
apache_manage_log(nginx_t)
')
+tunable_policy(`httpd_read_user_content',`
+ userdom_list_user_home_content(nginx_t)
+ userdom_read_user_home_content_files(nginx_t)
+')
+
tunable_policy(`nginx_enable_http_server',`
corenet_tcp_bind_http_port(nginx_t)
apache_read_all_content(nginx_t)
apache_manage_all_rw_content(nginx_t)
+ apache_list_sys_content(nginx_t)
')
# We enable both binding and connecting, since nginx acts here as a reverse proxy
@@ -159,6 +170,10 @@ tunable_policy(`nginx_can_network_connect',`
corenet_tcp_connect_all_ports(nginx_t)
')
+optional_policy(`
+ certbot_read_lib(nginx_t)
+')
+
optional_policy(`
phpfpm_stream_connect(nginx_t)
')
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] proj/hardened-refpolicy:various-20211111 commit in: policy/modules/contrib/
2022-06-06 15:15 [gentoo-commits] proj/hardened-refpolicy:concord-dev commit in: policy/modules/contrib/ Kenton Groombridge
@ 2022-06-06 15:15 ` Kenton Groombridge
0 siblings, 0 replies; 5+ messages in thread
From: Kenton Groombridge @ 2022-06-06 15:15 UTC (permalink / raw
To: gentoo-commits
commit: 150da78676fdc6ef33e63076759b696f790ab1ab
Author: Kenton Groombridge <concord <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 12 01:24:50 2021 +0000
Commit: Kenton Groombridge <concord <AT> gentoo <DOT> org>
CommitDate: Mon Jun 6 15:15:08 2022 +0000
URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=150da786
nginx: various fixes
Various fixes for nginx, and also allow nginx to list and read user home
content given that the httpd_read_user_content boolean is enabled.
Signed-off-by: Kenton Groombridge <concord <AT> gentoo.org>
policy/modules/contrib/nginx.te | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/policy/modules/contrib/nginx.te b/policy/modules/contrib/nginx.te
index 57e8ceb9..0c935bb6 100644
--- a/policy/modules/contrib/nginx.te
+++ b/policy/modules/contrib/nginx.te
@@ -119,8 +119,13 @@ domain_use_interactive_fds(nginx_t)
files_read_etc_files(nginx_t)
+auth_use_nsswitch(nginx_t)
+logging_send_syslog_msg(nginx_t)
+
+miscfiles_read_generic_certs(nginx_t)
miscfiles_read_localization(nginx_t)
+
sysnet_dns_name_resolve(nginx_t)
optional_policy(`
@@ -129,10 +134,16 @@ optional_policy(`
apache_manage_log(nginx_t)
')
+tunable_policy(`httpd_read_user_content',`
+ userdom_list_user_home_content(nginx_t)
+ userdom_read_user_home_content_files(nginx_t)
+')
+
tunable_policy(`nginx_enable_http_server',`
corenet_tcp_bind_http_port(nginx_t)
apache_read_all_content(nginx_t)
apache_manage_all_rw_content(nginx_t)
+ apache_list_sys_content(nginx_t)
')
# We enable both binding and connecting, since nginx acts here as a reverse proxy
@@ -159,6 +170,10 @@ tunable_policy(`nginx_can_network_connect',`
corenet_tcp_connect_all_ports(nginx_t)
')
+optional_policy(`
+ certbot_read_lib(nginx_t)
+')
+
optional_policy(`
phpfpm_stream_connect(nginx_t)
')
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] proj/hardened-refpolicy:various-20211111 commit in: policy/modules/contrib/
@ 2022-06-06 15:15 Kenton Groombridge
0 siblings, 0 replies; 5+ messages in thread
From: Kenton Groombridge @ 2022-06-06 15:15 UTC (permalink / raw
To: gentoo-commits
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)
')
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] proj/hardened-refpolicy:concord-dev commit in: policy/modules/contrib/
@ 2022-06-06 15:15 Kenton Groombridge
2022-06-06 15:15 ` [gentoo-commits] proj/hardened-refpolicy:various-20211111 " Kenton Groombridge
0 siblings, 1 reply; 5+ messages in thread
From: Kenton Groombridge @ 2022-06-06 15:15 UTC (permalink / raw
To: gentoo-commits
commit: 150da78676fdc6ef33e63076759b696f790ab1ab
Author: Kenton Groombridge <concord <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 12 01:24:50 2021 +0000
Commit: Kenton Groombridge <concord <AT> gentoo <DOT> org>
CommitDate: Mon Jun 6 15:15:08 2022 +0000
URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=150da786
nginx: various fixes
Various fixes for nginx, and also allow nginx to list and read user home
content given that the httpd_read_user_content boolean is enabled.
Signed-off-by: Kenton Groombridge <concord <AT> gentoo.org>
policy/modules/contrib/nginx.te | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/policy/modules/contrib/nginx.te b/policy/modules/contrib/nginx.te
index 57e8ceb9..0c935bb6 100644
--- a/policy/modules/contrib/nginx.te
+++ b/policy/modules/contrib/nginx.te
@@ -119,8 +119,13 @@ domain_use_interactive_fds(nginx_t)
files_read_etc_files(nginx_t)
+auth_use_nsswitch(nginx_t)
+logging_send_syslog_msg(nginx_t)
+
+miscfiles_read_generic_certs(nginx_t)
miscfiles_read_localization(nginx_t)
+
sysnet_dns_name_resolve(nginx_t)
optional_policy(`
@@ -129,10 +134,16 @@ optional_policy(`
apache_manage_log(nginx_t)
')
+tunable_policy(`httpd_read_user_content',`
+ userdom_list_user_home_content(nginx_t)
+ userdom_read_user_home_content_files(nginx_t)
+')
+
tunable_policy(`nginx_enable_http_server',`
corenet_tcp_bind_http_port(nginx_t)
apache_read_all_content(nginx_t)
apache_manage_all_rw_content(nginx_t)
+ apache_list_sys_content(nginx_t)
')
# We enable both binding and connecting, since nginx acts here as a reverse proxy
@@ -159,6 +170,10 @@ tunable_policy(`nginx_can_network_connect',`
corenet_tcp_connect_all_ports(nginx_t)
')
+optional_policy(`
+ certbot_read_lib(nginx_t)
+')
+
optional_policy(`
phpfpm_stream_connect(nginx_t)
')
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-06-06 15:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-06 15:15 [gentoo-commits] proj/hardened-refpolicy:concord-dev commit in: policy/modules/contrib/ Kenton Groombridge
2022-06-06 15:15 ` [gentoo-commits] proj/hardened-refpolicy:various-20211111 " Kenton Groombridge
-- strict thread matches above, loose matches on Subject: below --
2022-06-06 15:15 Kenton Groombridge
2022-06-06 15:13 Kenton Groombridge
2022-06-06 15:13 Kenton Groombridge
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox