From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 277C91393DD for ; Mon, 25 Aug 2014 17:16:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ED2F0E085A; Mon, 25 Aug 2014 17:16:26 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 375A0E0837 for ; Mon, 25 Aug 2014 17:16:25 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A15D5340092 for ; Mon, 25 Aug 2014 17:16:24 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 48FAC2DBB for ; Mon, 25 Aug 2014 17:16:23 +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: <1408986932.6ab581cd2f35bd605f0082c51f5db94c4ba06b20.perfinion@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:perfinion commit in: policy/modules/contrib/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/contrib/java.if policy/modules/contrib/java.te X-VCS-Directories: policy/modules/contrib/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: 6ab581cd2f35bd605f0082c51f5db94c4ba06b20 X-VCS-Branch: perfinion Date: Mon, 25 Aug 2014 17:16:23 +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: 433ef9b4-266d-4e49-96dc-10eb78c9c7b7 X-Archives-Hash: 60126e243de8ca4aaa8ef2edd79a50ae commit: 6ab581cd2f35bd605f0082c51f5db94c4ba06b20 Author: Jason Zaman perfinion com> AuthorDate: Mon Aug 18 09:51:22 2014 +0000 Commit: Jason Zaman perfinion com> CommitDate: Mon Aug 25 17:15:32 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=6ab581cd Add java_domain_type interface This interface will enable another domain to use Java without having to domtrans to java_t --- policy/modules/contrib/java.if | 34 ++++++++++++++++++++++++++++++++++ policy/modules/contrib/java.te | 3 +++ 2 files changed, 37 insertions(+) diff --git a/policy/modules/contrib/java.if b/policy/modules/contrib/java.if index acf6a63..f4b9444 100644 --- a/policy/modules/contrib/java.if +++ b/policy/modules/contrib/java.if @@ -327,3 +327,37 @@ template(`java_noatsecure_domtrans',` java_domtrans($1) ') + +####################################### +## +## The template for using java in a domain. +## +## +##

+## This template creates a derived domains which are used +## for java applications. +##

+##
+## +## +## The type of the domain to be given java privs. +## +## +# +template(`java_domain_type',` + gen_require(` + attribute java_domain; + type java_exec_t, java_tmp_t, java_tmpfs_t; + type java_home_t; + ') + + ######################################## + # + # Policy + # + + typeattribute $1 java_domain; + + # cannot be called on the attribute, so do it now + auth_use_nsswitch($1) +') diff --git a/policy/modules/contrib/java.te b/policy/modules/contrib/java.te index 11e996d..67af775 100644 --- a/policy/modules/contrib/java.te +++ b/policy/modules/contrib/java.te @@ -120,6 +120,9 @@ ifdef(`distro_gentoo',` manage_dirs_pattern(java_domain, java_home_t, java_home_t) manage_files_pattern(java_domain, java_home_t, java_home_t) userdom_user_home_dir_filetrans(java_domain, java_home_t, dir, ".icedtea") + + manage_lnk_files_pattern(java_domain, java_tmp_t, java_tmp_t) + files_tmp_filetrans(java_domain, java_tmp_t, lnk_file) ') tunable_policy(`allow_java_execstack',`