68874eb
diff --git a/policy/modules/apps/gnome.if b/policy/modules/apps/gnome.if
68874eb
index b1b6bf6..f9149e7 100644
68874eb
--- a/policy/modules/apps/gnome.if
68874eb
+++ b/policy/modules/apps/gnome.if
68874eb
@@ -51,7 +51,7 @@ interface(`gnome_role',`
68874eb
 ## </param>
68874eb
 ## <param name="user_domain">
68874eb
 ##      <summary>
68874eb
-##      The user domain associated with the role.
68874eb
+##      The user domain associated with the role. 
68874eb
 ##      </summary>
68874eb
 ## </param>
68874eb
 #
68874eb
@@ -98,7 +98,7 @@ interface(`gnome_role_gkeyringd',`
68874eb
 	allow $1_gkeyringd_t $3:dbus send_msg;
68874eb
 	allow $3 $1_gkeyringd_t:dbus send_msg;
68874eb
 	optional_policy(`
68874eb
-	       	dbus_session_domain($1_gkeyringd_t, gkeyringd_exec_t)
68874eb
+	       	dbus_session_domain($1, gkeyringd_exec_t, $1_gkeyringd_t)
68874eb
 		dbus_session_bus_client($1_gkeyringd_t)
68874eb
 		gnome_home_dir_filetrans($1_gkeyringd_t)
68874eb
 		gnome_manage_generic_home_dirs($1_gkeyringd_t)
68874eb
diff --git a/policy/modules/apps/telepathy.if b/policy/modules/apps/telepathy.if
68874eb
index 6878d68..4730846 100644
68874eb
--- a/policy/modules/apps/telepathy.if
68874eb
+++ b/policy/modules/apps/telepathy.if
68874eb
@@ -28,8 +28,6 @@ template(`telepathy_domain_template',`
68874eb
 	type telepathy_$1_tmp_t;
68874eb
 	files_tmp_file(telepathy_$1_tmp_t)
68874eb
 	ubac_constrained(telepathy_$1_tmp_t)
68874eb
-
68874eb
-	dbus_session_domain(telepathy_$1_t, telepathy_$1_exec_t)
68874eb
 ')
68874eb
 
68874eb
 #######################################
68874eb
@@ -51,6 +49,22 @@ template(`telepathy_domain_template',`
68874eb
 template(`telepathy_dbus_session_role', `
68874eb
 	gen_require(`
68874eb
 		attribute telepathy_domain;
68874eb
+		type telepathy_gabble_t;
68874eb
+		type telepathy_sofiasip_t;
68874eb
+		type telepathy_idle_t;
68874eb
+		type telepathy_mission_control_t;
68874eb
+		type telepathy_salut_t;
68874eb
+		type telepathy_sunshine_t;
68874eb
+		type telepathy_stream_engine_t;
68874eb
+		type telepathy_msn_t;
68874eb
+		type telepathy_gabble_exec_t;
68874eb
+		type telepathy_sofiasip_exec_t;
68874eb
+		type telepathy_idle_exec_t;
68874eb
+		type telepathy_mission_control_exec_t;
68874eb
+		type telepathy_salut_exec_t;
68874eb
+		type telepathy_sunshine_exec_t;
68874eb
+		type telepathy_stream_engine_exec_t;
68874eb
+		type telepathy_msn_exec_t;
68874eb
 	')
68874eb
 
68874eb
         role $1 types telepathy_domain;
68874eb
@@ -65,6 +79,15 @@ template(`telepathy_dbus_session_role', `
68874eb
 	telepathy_gabble_stream_connect($2)
68874eb
 	telepathy_msn_stream_connect($2)
68874eb
 	telepathy_salut_stream_connect($2)	
68874eb
+
68874eb
+	dbus_session_domain($2, telepathy_gabble_exec_t, telepathy_gabble_t)
68874eb
+	dbus_session_domain($2, telepathy_sofiasip_exec_t, telepathy_sofiasip_t)
68874eb
+	dbus_session_domain($2, telepathy_idle_exec_t, telepathy_idle_t)
68874eb
+	dbus_session_domain($2, telepathy_mission_control_exec_t, telepathy_mission_control_t)
68874eb
+	dbus_session_domain($2, telepathy_salut_exec_t, telepathy_salut_t)
68874eb
+	dbus_session_domain($2, telepathy_sunshine_exec_t, telepathy_sunshine_t)
68874eb
+	dbus_session_domain($2, telepathy_stream_engine_exec_t, telepathy_stream_engine_t)
68874eb
+	dbus_session_domain($2, telepathy_msn_exec_t, telepathy_msn_t)
68874eb
 ')
68874eb
 
68874eb
 ########################################
68874eb
@@ -147,7 +170,6 @@ interface(`telepathy_msn_stream_connect', `
68874eb
         files_search_tmp($1)
68874eb
 ')
68874eb
 
68874eb
-
68874eb
 ########################################
68874eb
 ## <summary>
68874eb
 ##	Stream connect to Telepathy Salut
68874eb
@@ -191,3 +213,46 @@ interface(`telepathy_mission_control_read_state',`
68874eb
 	ps_process_pattern($1, telepathy_mission_control_t)
68874eb
 ')
68874eb
 
68874eb
+########################################
68874eb
+## <summary>
68874eb
+##	Execute telepathy executable
68874eb
+##	in the specified domain.
68874eb
+## </summary>
68874eb
+## <desc>
68874eb
+##	

68874eb
+##	Execute a telepathy executable
68874eb
+##	in the specified domain.  This allows
68874eb
+##	the specified domain to execute any file
68874eb
+##	on these filesystems in the specified
68874eb
+##	domain. 
68874eb
+##	

68874eb
+##	

68874eb
+##	No interprocess communication (signals, pipes,
68874eb
+##	etc.) is provided by this interface since
68874eb
+##	the domains are not owned by this module.
68874eb
+##	

68874eb
+##	

68874eb
+##	This interface was added to handle
68874eb
+##	the ssh-agent policy.
68874eb
+##	

68874eb
+## </desc>
68874eb
+## <param name="domain">
68874eb
+##	<summary>
68874eb
+##	Domain allowed to transition.
68874eb
+##	</summary>
68874eb
+## </param>
68874eb
+## <param name="target_domain">
68874eb
+##	<summary>
68874eb
+##	The type of the new process.
68874eb
+##	</summary>
68874eb
+## </param>
68874eb
+#
68874eb
+interface(`telepathy_command_domtrans', `
68874eb
+	gen_require(`
68874eb
+		attribute telepathy_executable;
68874eb
+	')
68874eb
+
68874eb
+	allow $2 telepathy_executable:file entrypoint;
68874eb
+	domain_transition_pattern($1, telepathy_executable, $2)
68874eb
+	type_transition $1 telepathy_executable:process $2;
68874eb
+')
48fe972
diff --git a/policy/modules/apps/telepathy.te b/policy/modules/apps/telepathy.te
48fe972
index 68211c2..665dce1 100644
48fe972
--- a/policy/modules/apps/telepathy.te
48fe972
+++ b/policy/modules/apps/telepathy.te
48fe972
@@ -351,3 +351,14 @@ permissive telepathy_salut_t;
48fe972
 permissive telepathy_sunshine_t;
48fe972
 permissive telepathy_stream_engine_t;
48fe972
 permissive telepathy_msn_t;
48fe972
+
48fe972
+
48fe972
+# Just for F15
48fe972
+
48fe972
+optional_policy(`
48fe972
+	gen_require(`
48fe972
+		role unconfined_r;
48fe972
+	')
48fe972
+
48fe972
+	role unconfined_r types telepathy_domain;
48fe972
+')
68874eb
diff --git a/policy/modules/roles/staff.te b/policy/modules/roles/staff.te
68874eb
index db5a937..fb6c6bd 100644
68874eb
--- a/policy/modules/roles/staff.te
68874eb
+++ b/policy/modules/roles/staff.te
68874eb
@@ -84,8 +84,6 @@ optional_policy(`
68874eb
 
68874eb
 optional_policy(`
68874eb
 	gnome_role(staff_r, staff_t)
68874eb
-	gnome_role_gkeyringd(staff, staff_r, staff_t)
68874eb
-	permissive staff_gkeyringd_t;
68874eb
 ')
68874eb
 
68874eb
 optional_policy(`
68874eb
diff --git a/policy/modules/roles/unconfineduser.te b/policy/modules/roles/unconfineduser.te
68874eb
index 805d0ea..693d944 100644
68874eb
--- a/policy/modules/roles/unconfineduser.te
68874eb
+++ b/policy/modules/roles/unconfineduser.te
68874eb
@@ -295,6 +295,10 @@ optional_policy(`
68874eb
 	')
68874eb
 
68874eb
 	optional_policy(`
68874eb
+		telepathy_command_domtrans(unconfined_dbusd_t, unconfined_t)
68874eb
+	')
68874eb
+
68874eb
+	optional_policy(`
68874eb
 		oddjob_dbus_chat(unconfined_usertype)
68874eb
 	')
68874eb
 
68874eb
@@ -416,10 +420,6 @@ optional_policy(`
68874eb
 ')
68874eb
 
68874eb
 optional_policy(`
68874eb
-	telepathy_dbus_session_role(unconfined_r, unconfined_t)
68874eb
-')
68874eb
-
68874eb
-optional_policy(`
68874eb
 	vbetool_run(unconfined_t, unconfined_r)
68874eb
 ')
68874eb
 
68874eb
@@ -500,4 +500,3 @@ domain_ptrace_all_domains(unconfined_notrans_t)
68874eb
 #
68874eb
 
68874eb
 gen_user(unconfined_u, user, unconfined_r system_r, s0, s0 - mls_systemhigh, mcs_allcats)
68874eb
-
68874eb
diff --git a/policy/modules/roles/unprivuser.te b/policy/modules/roles/unprivuser.te
68874eb
index dc6b88f..b56a290 100644
68874eb
--- a/policy/modules/roles/unprivuser.te
68874eb
+++ b/policy/modules/roles/unprivuser.te
68874eb
@@ -35,7 +35,6 @@ optional_policy(`
68874eb
 
68874eb
 optional_policy(`
68874eb
 	gnome_role(user_r, user_t)
68874eb
-
68874eb
 ')
68874eb
 
68874eb
 optional_policy(`
68874eb
diff --git a/policy/modules/services/dbus.if b/policy/modules/services/dbus.if
68874eb
index cee56c8..d2d4d9d 100644
68874eb
--- a/policy/modules/services/dbus.if
68874eb
+++ b/policy/modules/services/dbus.if
68874eb
@@ -363,6 +363,12 @@ interface(`dbus_connect_session_bus',`
68874eb
 ##	Allow a application domain to be started
68874eb
 ##	by the session dbus.
68874eb
 ## </summary>
68874eb
+## <param name="prefix">
68874eb
+##	<summary>
68874eb
+##	The prefix of the dbus session domain (e.g., user
68874eb
+##	is the prefix for user_t).
68874eb
+##	</summary>
68874eb
+## </param>
68874eb
 ## <param name="domain">
68874eb
 ##	<summary>
68874eb
 ##	Type to be used as a domain.
68874eb
@@ -377,13 +383,13 @@ interface(`dbus_connect_session_bus',`
68874eb
 #
68874eb
 interface(`dbus_session_domain',`
68874eb
 	gen_require(`
68874eb
-		attribute session_bus_type;
68874eb
+		type $1_dbusd_t;
68874eb
 	')
68874eb
 
68874eb
-	domtrans_pattern(session_bus_type, $2, $1)
68874eb
+	domtrans_pattern($1_dbusd_t, $2, $3)
68874eb
 
68874eb
-	dbus_session_bus_client($1)
68874eb
-	dbus_connect_session_bus($1)
68874eb
+	dbus_session_bus_client($3)
68874eb
+	dbus_connect_session_bus($3)
68874eb
 ')
68874eb
 
68874eb
 ########################################
68874eb
diff --git a/policy/modules/system/userdomain.if b/policy/modules/system/userdomain.if
68874eb
index 4984747..f690d75 100644
68874eb
--- a/policy/modules/system/userdomain.if
68874eb
+++ b/policy/modules/system/userdomain.if
68874eb
@@ -1078,6 +1078,7 @@ template(`userdom_restricted_xwindows_user_template',`
68874eb
 	 # bug: #682499
68874eb
 	 optional_policy(`
68874eb
 	 	gnome_read_usr_config($1_usertype)
68874eb
+		gnome_role_gkeyringd($1, $1_r, $1_t)
68874eb
 	')
68874eb
 
68874eb
 	optional_policy(`