Skip to contentSkip to conversation

Support mozilla_roles

PATCH New Sven Vermeulen 2 participants 3 messages May 1, 2012 – May 4, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 Support mozilla_roles

The mozilla definition already includes the mozilla_roles role attribute, but missed including the mozilla_plugin in it. Also, the mozilla_role() interface should add the mozilla_roles attribute to the calling role, not just the mozilla_t type.

---
 mozilla.if |    3 ++-
 mozilla.te |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
mozilla.if +2 -1
index af2ba47..b397fde 100644
@@ -18,9 +18,10 @@
 interface(`mozilla_role',`
 	gen_require(`
 		type mozilla_t, mozilla_exec_t, mozilla_home_t;
+		attribute_role mozilla_roles;
 	')
 
-	role $1 types mozilla_t;
+	roleattribute $1 mozilla_roles;
 
 	domain_auto_trans($2, mozilla_exec_t, mozilla_t)
 	# Unrestricted inheritance from the caller.
mozilla.te +1 -1
index c4f425d..d3fad85 100644
@@ -32,7 +32,7 @@ userdom_user_home_content(mozilla_home_t)
 type mozilla_plugin_t;
 type mozilla_plugin_exec_t;
 application_domain(mozilla_plugin_t, mozilla_plugin_exec_t)
-role system_r types mozilla_plugin_t;
+role mozilla_roles types mozilla_plugin_t;
 
 type mozilla_plugin_tmp_t;
 userdom_user_tmp_file(mozilla_plugin_tmp_t)
Signature · 1 line
1.7.3.4
#1 lore raw

PATCH 2/2 Support mozilla_roles

Quoted 4 lines · Sven Vermeulen

The mozilla definition already includes the mozilla_roles role attribute, but missed including the mozilla_plugin in it. Also, the mozilla_role() interface should add the mozilla_roles attribute to the calling role, not just the mozilla_t type.

The patch is okay, just the title should've said "[PATCH 1/1]", not 2/2. I had another patch in the queue but that one is not ready yet for inclusion...

Wkr,
Sven Vermeulen

#2 lore raw

PATCH 2/2 Support mozilla_roles

In reply to Sven Vermeulen
Quoted 30 lines · Sven Vermeulen

The mozilla definition already includes the mozilla_roles role attribute, but missed including the mozilla_plugin in it. Also, the mozilla_role() interface should add the mozilla_roles attribute to the calling role, not just the mozilla_t type.

---
 mozilla.if |    3 ++-
 mozilla.te |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
mozilla.if +2 -1
index af2ba47..b397fde 100644
@@ -18,9 +18,10 @@
 interface(`mozilla_role',`
 	gen_require(`
 		type mozilla_t, mozilla_exec_t, mozilla_home_t;
+		attribute_role mozilla_roles;
 	')
 
-	role $1 types mozilla_t;
+	roleattribute $1 mozilla_roles;
 
 	domain_auto_trans($2, mozilla_exec_t, mozilla_t)
 	# Unrestricted inheritance from the caller.
mozilla.te +0 -0
index c4f425d..d3fad85 100644

mozilla.te userdom_user_home_content(mozilla_home_t) · line 38

Quoted 8 lines
mozilla.te +1 -1
@@ -32,7 +32,7 @@ userdom_user_home_content(mozilla_home_t)
 type mozilla_plugin_t;
 type mozilla_plugin_exec_t;
 application_domain(mozilla_plugin_t, mozilla_plugin_exec_t)
-role system_r types mozilla_plugin_t;
+role mozilla_roles types mozilla_plugin_t;
 
 type mozilla_plugin_tmp_t;
 userdom_user_tmp_file(mozilla_plugin_tmp_t)

Merged.

Signature · 3 lines
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com