Dominick Grift 7da0c6b
## <summary>Thunderbird email client.</summary>
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Dominick Grift 7da0c6b
##	Role access for thunderbird.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="role">
Chris PeBenito 9401ae1
##	<summary>
Dominick Grift 7da0c6b
##	Role allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Dominick Grift 7da0c6b
##	User domain for the role.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`thunderbird_role',`
Chris PeBenito 9401ae1
	gen_require(`
Dominick Grift 7da0c6b
		attribute_role thunderbird_roles;
Dominick Grift 7da0c6b
		type thunderbird_t, thunderbird_exec_t, thunderbird_home_t;
Dominick Grift 7da0c6b
		type thunderbird_tmpfs_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Dominick Grift 7da0c6b
	roleattribute $1 thunderbird_roles;
Dominick Grift 7da0c6b
Dominick Grift 7da0c6b
	domtrans_pattern($2, thunderbird_exec_t, thunderbird_t)
Dominick Grift 7da0c6b
Dominick Grift 7da0c6b
	stream_connect_pattern($2, thunderbird_tmpfs_t, thunderbird_tmpfs_t, thunderbird_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	allow thunderbird_t $2:unix_stream_socket connectto;
Chris PeBenito 9401ae1
Dominick Grift 7da0c6b
	allow $2 thunderbird_t:process { ptrace signal_perms };
Chris PeBenito 9401ae1
	ps_process_pattern($2, thunderbird_t)
Dominick Grift 7da0c6b
Dominick Grift 7da0c6b
	allow $2 thunderbird_home_t:dir { manage_dir_perms relabel_dir_perms };
Dominick Grift 7da0c6b
	allow $2 thunderbird_home_t:file { manage_file_perms relabel_file_perms };
Dominick Grift 7da0c6b
	allow $2 thunderbird_home_t:lnk_file { manage_lnk_file_perms relabel_lnk_file_perms };
Dominick Grift 7da0c6b
	userdom_user_home_dir_filetrans($2, thunderbird_home_t, dir, ".thunderbird")
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Dominick Grift 7da0c6b
##	Execute thunderbird in the thunderbird domain.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed to transition.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`thunderbird_domtrans',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type thunderbird_t, thunderbird_exec_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Dominick Grift 7da0c6b
	corecmd_search_bin($1)
Chris PeBenito 9401ae1
	domtrans_pattern($1, thunderbird_exec_t, thunderbird_t)
Chris PeBenito 9401ae1
')