From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-950648-garchives=archives.gentoo.org@lists.gentoo.org>
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 F269B139694
	for <garchives@archives.gentoo.org>; Thu, 18 May 2017 17:02:59 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 2E72EE0F12;
	Thu, 18 May 2017 17:02:57 +0000 (UTC)
Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(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 116A7E0F12
	for <gentoo-commits@lists.gentoo.org>; Thu, 18 May 2017 17:02:47 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(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 B13B43416B7
	for <gentoo-commits@lists.gentoo.org>; Thu, 18 May 2017 17:02:40 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 5B1397469
	for <gentoo-commits@lists.gentoo.org>; Thu, 18 May 2017 17:02:38 +0000 (UTC)
From: "Sven Vermeulen" <swift@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sven Vermeulen" <swift@gentoo.org>
Message-ID: <1495126916.a02b60e38aeebbef9175e93856bf455eef0a7ebc.swift@gentoo>
Subject: [gentoo-commits] proj/hardened-refpolicy:swift commit in: policy/modules/contrib/
X-VCS-Repository: proj/hardened-refpolicy
X-VCS-Files: policy/modules/contrib/mozilla.if policy/modules/contrib/openoffice.te
X-VCS-Directories: policy/modules/contrib/
X-VCS-Committer: swift
X-VCS-Committer-Name: Sven Vermeulen
X-VCS-Revision: a02b60e38aeebbef9175e93856bf455eef0a7ebc
X-VCS-Branch: swift
Date: Thu, 18 May 2017 17:02:38 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 708a6db2-7cb4-4a1f-a389-2bd4565627a6
X-Archives-Hash: 624cc8c1e0273f8e8e9634b94f095433
Message-ID: <20170518170238.5W7EBYdtunHJC_CMZE8TY-mLQ4HtsLxMbmxzwwhXFY8@z>

commit:     a02b60e38aeebbef9175e93856bf455eef0a7ebc
Author:     Guido Trentalancia <guido <AT> trentalancia <DOT> net>
AuthorDate: Sat May 13 15:55:57 2017 +0000
Commit:     Sven Vermeulen <swift <AT> gentoo <DOT> org>
CommitDate: Thu May 18 17:01:56 2017 +0000
URL:        https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=a02b60e3

openoffice: open files retrieved using mozilla

Let openoffice open files retrieved from the network using mozilla.

Signed-off-by: Guido Trentalancia <guido at trentalancia.net>

 policy/modules/contrib/mozilla.if    | 18 ++++++++++++++++++
 policy/modules/contrib/openoffice.te |  1 +
 2 files changed, 19 insertions(+)

diff --git a/policy/modules/contrib/mozilla.if b/policy/modules/contrib/mozilla.if
index ffda45d3..70390632 100644
--- a/policy/modules/contrib/mozilla.if
+++ b/policy/modules/contrib/mozilla.if
@@ -309,6 +309,24 @@ interface(`mozilla_execmod_user_plugin_home_files',`
 	allow $1 mozilla_plugin_home_t:file execmod;
 ')
 
+#######################################
+## <summary>
+##	Read temporary mozilla files.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`mozilla_read_tmp_files',`
+	gen_require(`
+		type mozilla_tmp_t;
+	')
+
+	read_files_pattern($1, mozilla_tmp_t, mozilla_tmp_t)
+')
+
 ########################################
 ## <summary>
 ##	Run mozilla in the mozilla domain.

diff --git a/policy/modules/contrib/openoffice.te b/policy/modules/contrib/openoffice.te
index 0be66b6f..40e3d97f 100644
--- a/policy/modules/contrib/openoffice.te
+++ b/policy/modules/contrib/openoffice.te
@@ -128,6 +128,7 @@ optional_policy(`
 
 optional_policy(`
 	mozilla_domtrans(ooffice_t)
+	mozilla_read_tmp_files(ooffice_t)
 ')
 
 optional_policy(`