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 65B13158091 for ; Mon, 6 Jun 2022 15:14:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A77BFE0886; Mon, 6 Jun 2022 15:14:05 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 5DC70E0886 for ; Mon, 6 Jun 2022 15:14:05 +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 3D776341A3A for ; Mon, 6 Jun 2022 15:14:04 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 181854F6 for ; Mon, 6 Jun 2022 15:13:32 +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: <1654528385.7c566c428891f598517ef92a5feda42d5bced030.concord@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:various-20211111 commit in: policy/modules/contrib/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/contrib/nginx.te X-VCS-Directories: policy/modules/contrib/ X-VCS-Committer: concord X-VCS-Committer-Name: Kenton Groombridge X-VCS-Revision: 7c566c428891f598517ef92a5feda42d5bced030 X-VCS-Branch: various-20211111 Date: Mon, 6 Jun 2022 15:13:32 +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: 76d0d876-31c3-4187-9c06-dab41fae0cd2 X-Archives-Hash: ad8bd5b188d59b4d0588c38354d2a6c8 commit: 7c566c428891f598517ef92a5feda42d5bced030 Author: Kenton Groombridge gentoo org> AuthorDate: Fri Nov 12 01:24:50 2021 +0000 Commit: Kenton Groombridge gentoo 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 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) ') 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 AC6B3158091 for ; Mon, 6 Jun 2022 15:13:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ED330E0876; Mon, 6 Jun 2022 15:13:52 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 D12A8E0876 for ; Mon, 6 Jun 2022 15:13:52 +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 DAB97341A58 for ; Mon, 6 Jun 2022 15:13:48 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 714EC4FA for ; Mon, 6 Jun 2022 15:13:47 +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: <1654528385.7c566c428891f598517ef92a5feda42d5bced030.concord@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:concord-dev commit in: policy/modules/contrib/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/contrib/nginx.te X-VCS-Directories: policy/modules/contrib/ X-VCS-Committer: concord X-VCS-Committer-Name: Kenton Groombridge X-VCS-Revision: 7c566c428891f598517ef92a5feda42d5bced030 X-VCS-Branch: concord-dev Date: Mon, 6 Jun 2022 15:13:47 +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: 9f72f40b-784d-48ab-9eed-9fd4461c5ada X-Archives-Hash: b4e20064bca518808ab23a897bf5f696 Message-ID: <20220606151347.MerrTImiNJ5rtJAl_FfFAcsKHXbJTlAP87GzhBBgBPc@z> commit: 7c566c428891f598517ef92a5feda42d5bced030 Author: Kenton Groombridge gentoo org> AuthorDate: Fri Nov 12 01:24:50 2021 +0000 Commit: Kenton Groombridge gentoo 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 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) ')