Skip to contentSkip to conversation

openoffice: open files retrieved using mozilla

PATCH New Guido Trentalancia 2 participants 2 messages May 13, 2017 – May 15, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 openoffice: open files retrieved using mozilla

Let openoffice open files retrieved from the network using mozilla.

---
 policy/modules/contrib/mozilla.if    |   18 ++++++++++++++++++
 policy/modules/contrib/openoffice.te |    1 +
 2 files changed, 19 insertions(+)
policy/modules/contrib/mozilla.if +18 -0
@@ -288,6 +288,24 @@ interface(`mozilla_execmod_user_plugin_h
 	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.
policy/modules/contrib/openoffice.te +1 -0
@@ -128,6 +152,7 @@ optional_policy(`
 
 optional_policy(`
 	mozilla_domtrans(ooffice_t)
+	mozilla_read_tmp_files(ooffice_t)
 ')
 
 optional_policy(`
#1 lore raw

PATCH 1/1 openoffice: open files retrieved using mozilla

Quoted 38 lines · Guido Trentalancia via refpolicy

Let openoffice open files retrieved from the network using mozilla.

---
 policy/modules/contrib/mozilla.if    |   18 ++++++++++++++++++
 policy/modules/contrib/openoffice.te |    1 +
 2 files changed, 19 insertions(+)
policy/modules/contrib/mozilla.if +18 -0
@@ -288,6 +288,24 @@ interface(`mozilla_execmod_user_plugin_h
 	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.

policy/modules/contrib/openoffice.te optional_policy(` · line 158

Quoted 7 lines
policy/modules/contrib/openoffice.te +1 -0
@@ -128,6 +152,7 @@ optional_policy(`
 
 optional_policy(`
 	mozilla_domtrans(ooffice_t)
+	mozilla_read_tmp_files(ooffice_t)
 ')
 
 optional_policy(`

Merged, though I moved the interface implementation.

Signature · 1 line
Chris PeBenito