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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D1723139694 for ; Sun, 30 Apr 2017 09:33:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5699DE0E0D; Sun, 30 Apr 2017 09:33:20 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1640CE0E0D for ; Sun, 30 Apr 2017 09:33:05 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 32B423416A0 for ; Sun, 30 Apr 2017 09:32:49 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 63A237453 for ; Sun, 30 Apr 2017 09:32:45 +0000 (UTC) From: "Jason Zaman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jason Zaman" Message-ID: <1493543807.1dfdf221ae0952dfcba50f8380b75150f07c2d8a.perfinion@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/contrib/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/contrib/apache.te X-VCS-Directories: policy/modules/contrib/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: 1dfdf221ae0952dfcba50f8380b75150f07c2d8a X-VCS-Branch: master Date: Sun, 30 Apr 2017 09:32:45 +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-Archives-Salt: 37944a90-8037-4505-86dd-89630328e28b X-Archives-Hash: ed33925e9a8f12f129245acc631ed9cf Message-ID: <20170430093245.80J5FYrqcMu7yxpowpOdOvYQTUBak1_F4v82kIuuLzk@z> commit: 1dfdf221ae0952dfcba50f8380b75150f07c2d8a Author: Sven Vermeulen siphos be> AuthorDate: Thu Apr 20 15:07:37 2017 +0000 Commit: Jason Zaman gentoo org> CommitDate: Sun Apr 30 09:16:47 2017 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=1dfdf221 rpc_* interfaces should be wrapped by optional_policy() The rpc module is not a core module. As such, calls towards rpc_* interfaces should be wrapped with optional_policy(). Changes since v2: - Wrapped other calls towards rpc_* within apache.te Changes since v1: - Fixed wrong quotation mark Signed-off-by: Sven Vermeulen siphos.be> policy/modules/contrib/apache.te | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/policy/modules/contrib/apache.te b/policy/modules/contrib/apache.te index b418338c..ce6479e8 100644 --- a/policy/modules/contrib/apache.te +++ b/policy/modules/contrib/apache.te @@ -745,10 +745,12 @@ tunable_policy(`httpd_use_fusefs && httpd_builtin_scripting',` fs_exec_fusefs_files(httpd_t) ') -tunable_policy(`httpd_use_nfs',` - fs_list_auto_mountpoints(httpd_t) - rpc_manage_nfs_rw_content(httpd_t) - rpc_read_nfs_content(httpd_t) +optional_policy(` + tunable_policy(`httpd_use_nfs',` + fs_list_auto_mountpoints(httpd_t) + rpc_manage_nfs_rw_content(httpd_t) + rpc_read_nfs_content(httpd_t) + ') ') tunable_policy(`httpd_use_nfs && httpd_builtin_scripting',` @@ -1070,10 +1072,12 @@ tunable_policy(`httpd_use_fusefs && httpd_builtin_scripting',` fs_exec_fusefs_files(httpd_suexec_t) ') -tunable_policy(`httpd_use_nfs',` - fs_list_auto_mountpoints(httpd_suexec_t) - rpc_manage_nfs_rw_content(httpd_t) - rpc_read_nfs_content(httpd_t) +optional_policy(` + tunable_policy(`httpd_use_nfs',` + fs_list_auto_mountpoints(httpd_suexec_t) + rpc_manage_nfs_rw_content(httpd_t) + rpc_read_nfs_content(httpd_t) + ') ') tunable_policy(`httpd_use_nfs && httpd_builtin_scripting',` @@ -1307,10 +1311,12 @@ tunable_policy(`httpd_use_fusefs && httpd_builtin_scripting',` fs_exec_fusefs_files(httpd_sys_script_t) ') -tunable_policy(`httpd_use_nfs',` - fs_list_auto_mountpoints(httpd_sys_script_t) - rpc_manage_nfs_rw_content(httpd_t) - rpc_read_nfs_content(httpd_t) +optional_policy(` + tunable_policy(`httpd_use_nfs',` + fs_list_auto_mountpoints(httpd_sys_script_t) + rpc_manage_nfs_rw_content(httpd_t) + rpc_read_nfs_content(httpd_t) + ') ') tunable_policy(`httpd_use_nfs && httpd_builtin_scripting',`