Chris PeBenito 9401ae1
## <summary>Telepathy communications framework.</summary>
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
#######################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Creates basic types for telepathy
Chris PeBenito 9401ae1
##	domain
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="prefix">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Prefix for the domain.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
template(`telepathy_domain_template',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		attribute telepathy_domain;
Chris PeBenito 9401ae1
		attribute telepathy_executable;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	type telepathy_$1_t, telepathy_domain;
Chris PeBenito 9401ae1
	type telepathy_$1_exec_t, telepathy_executable;
Chris PeBenito 66b26ac
	userdom_user_application_domain(telepathy_$1_t, telepathy_$1_exec_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	type telepathy_$1_tmp_t;
Chris PeBenito 66b26ac
	userdom_user_tmp_file(telepathy_$1_tmp_t)
Chris PeBenito 7b2152c
Chris PeBenito 7b2152c
	auth_use_nsswitch(telepathy_$1_t)
Chris PeBenito 7b2152c
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
#######################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##		Role access for telepathy domains
Chris PeBenito 9401ae1
###     that executes via dbus-session
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="user_role">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	The role associated with the user domain.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
## <param name="user_domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	The type of the user domain.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
template(`telepathy_role', `
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		attribute telepathy_domain;
Chris PeBenito 9401ae1
		type telepathy_gabble_t, telepathy_sofiasip_t, telepathy_idle_t;
Chris PeBenito 9401ae1
		type telepathy_mission_control_t, telepathy_salut_t, telepathy_sunshine_t;
Chris PeBenito 9401ae1
		type telepathy_stream_engine_t, telepathy_msn_t, telepathy_gabble_exec_t;
Chris PeBenito 9401ae1
		type telepathy_sofiasip_exec_t, telepathy_idle_exec_t;
Chris PeBenito 9401ae1
		type telepathy_logger_t, telepathy_logger_exec_t;
Chris PeBenito 9401ae1
		type telepathy_mission_control_exec_t, telepathy_salut_exec_t;
Chris PeBenito 9401ae1
		type telepathy_sunshine_exec_t, telepathy_stream_engine_exec_t;
Chris PeBenito 9401ae1
		type telepathy_msn_exec_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	role $1 types telepathy_domain;
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow $2 telepathy_domain:process signal_perms;
Chris PeBenito 9401ae1
	ps_process_pattern($2, telepathy_domain)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	telepathy_gabble_stream_connect($2)
Chris PeBenito 9401ae1
	telepathy_msn_stream_connect($2)
Chris PeBenito 9401ae1
	telepathy_salut_stream_connect($2)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	dbus_session_domain($3, telepathy_gabble_exec_t, telepathy_gabble_t)
Chris PeBenito 9401ae1
	dbus_session_domain($3, telepathy_sofiasip_exec_t, telepathy_sofiasip_t)
Chris PeBenito 9401ae1
	dbus_session_domain($3, telepathy_idle_exec_t, telepathy_idle_t)
Chris PeBenito 9401ae1
	dbus_session_domain($3, telepathy_logger_exec_t, telepathy_logger_t)
Chris PeBenito 9401ae1
	dbus_session_domain($3, telepathy_mission_control_exec_t, telepathy_mission_control_t)
Chris PeBenito 9401ae1
	dbus_session_domain($3, telepathy_salut_exec_t, telepathy_salut_t)
Chris PeBenito 9401ae1
	dbus_session_domain($3, telepathy_sunshine_exec_t, telepathy_sunshine_t)
Chris PeBenito 9401ae1
	dbus_session_domain($3, telepathy_stream_engine_exec_t, telepathy_stream_engine_t)
Chris PeBenito 9401ae1
	dbus_session_domain($3, telepathy_msn_exec_t, telepathy_msn_t)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Stream connect to Telepathy Gabble
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
## 	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`telepathy_gabble_stream_connect', `
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type telepathy_gabble_t, telepathy_gabble_tmp_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	stream_connect_pattern($1, telepathy_gabble_tmp_t, telepathy_gabble_tmp_t, telepathy_gabble_t)
Chris PeBenito 9401ae1
	files_search_tmp($1)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Send DBus messages to and from
Chris PeBenito 9401ae1
##	Telepathy Gabble.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
## 	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`telepathy_gabble_dbus_chat', `
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type telepathy_gabble_t;
Chris PeBenito 9401ae1
		class dbus send_msg;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow $1 telepathy_gabble_t:dbus send_msg;
Chris PeBenito 9401ae1
	allow telepathy_gabble_t $1:dbus send_msg;
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Read telepathy mission control state.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="role_prefix">
Chris PeBenito 9401ae1
## 	<summary>
Chris PeBenito 9401ae1
##	Prefix to be used.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
## 	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`telepathy_mission_control_read_state',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type telepathy_mission_control_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	kernel_search_proc($1)
Chris PeBenito 9401ae1
	ps_process_pattern($1, telepathy_mission_control_t)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
#######################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Stream connect to telepathy MSN managers
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`telepathy_msn_stream_connect', `
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type telepathy_msn_t, telepathy_msn_tmp_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	stream_connect_pattern($1, telepathy_msn_tmp_t, telepathy_msn_tmp_t, telepathy_msn_t)
Chris PeBenito 9401ae1
	files_search_tmp($1)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Stream connect to Telepathy Salut
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
## 	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`telepathy_salut_stream_connect', `
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type telepathy_salut_t, telepathy_salut_tmp_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	stream_connect_pattern($1, telepathy_salut_tmp_t, telepathy_salut_tmp_t, telepathy_salut_t)
Chris PeBenito 9401ae1
	files_search_tmp($1)
Chris PeBenito 9401ae1
')