Chris PeBenito 1852726
## <summary>Thunderbird email client</summary>
Chris PeBenito 1852726
Chris PeBenito 296273a
########################################
Chris PeBenito 1852726
## <summary>
Chris PeBenito 296273a
##	Role access for thunderbird
Chris PeBenito 1852726
## </summary>
Chris PeBenito 296273a
## <param name="role">
Chris PeBenito 1852726
##	<summary>
Chris PeBenito 296273a
##	Role allowed access
Chris PeBenito 1852726
##	</summary>
Chris PeBenito 1852726
## </param>
Chris PeBenito 296273a
## <param name="domain">
Chris PeBenito 1852726
##	<summary>
Chris PeBenito 296273a
##	User domain for the role
Chris PeBenito 1852726
##	</summary>
Chris PeBenito 1852726
## </param>
Chris PeBenito 1852726
#
Chris PeBenito 296273a
interface(`thunderbird_role',`
Chris PeBenito 296273a
	gen_require(`
Chris PeBenito 296273a
		type thunderbird_t, thunderbird_exec_t;
Chris PeBenito 296273a
		type thunderbird_home_t, thunderbird_tmpfs_t;
Chris PeBenito 1852726
	')
Chris PeBenito 1852726
Chris PeBenito 296273a
	role $1 types thunderbird_t;
Chris PeBenito 6b19be3
Chris PeBenito 296273a
	domain_auto_trans($2, thunderbird_exec_t, thunderbird_t)
Chris PeBenito 296273a
	allow $2 thunderbird_t:fd use;
Chris PeBenito 296273a
	allow $2 thunderbird_t:shm { associate getattr };
Chris PeBenito 296273a
	allow $2 thunderbird_t:unix_stream_socket connectto;
Chris PeBenito 296273a
	allow thunderbird_t $2:fd use;
Chris PeBenito 296273a
	allow thunderbird_t $2:process sigchld;
Chris PeBenito 296273a
	allow thunderbird_t $2:unix_stream_socket connectto;
Chris PeBenito 6b19be3
Chris PeBenito 296273a
	# allow ps to show thunderbird and allow the user to kill it 
Chris PeBenito 296273a
	ps_process_pattern($2, thunderbird_t)
Chris PeBenito 296273a
	allow $2 thunderbird_t:process signal;
Chris PeBenito 1852726
Chris PeBenito 296273a
	# Access ~/.thunderbird
Chris PeBenito 296273a
	manage_dirs_pattern($2, thunderbird_home_t, thunderbird_home_t)
Chris PeBenito 296273a
	manage_files_pattern($2, thunderbird_home_t, thunderbird_home_t)
Chris PeBenito 296273a
	manage_lnk_files_pattern($2, thunderbird_home_t, thunderbird_home_t)
Chris PeBenito 296273a
	relabel_dirs_pattern($2, thunderbird_home_t, thunderbird_home_t)
Chris PeBenito 296273a
	relabel_files_pattern($2, thunderbird_home_t, thunderbird_home_t)
Chris PeBenito 296273a
	relabel_lnk_files_pattern($2, thunderbird_home_t, thunderbird_home_t)
Chris PeBenito 6b19be3
')
Chris PeBenito 1852726
Chris PeBenito 6b19be3
########################################
Chris PeBenito 6b19be3
## <summary>
Chris PeBenito 6b19be3
##	Run thunderbird in the user thunderbird domain.
Chris PeBenito 6b19be3
## </summary>
Chris PeBenito 6b19be3
## <param name="domain">
Chris PeBenito 6b19be3
##	<summary>
Dominick Grift 03b8666
##	Domain allowed to transition.
Chris PeBenito 6b19be3
##	</summary>
Chris PeBenito 6b19be3
## </param>
Chris PeBenito 6b19be3
#
Chris PeBenito 296273a
interface(`thunderbird_domtrans',`
Chris PeBenito 6b19be3
	gen_require(`
Chris PeBenito 296273a
		type thunderbird_t, thunderbird_exec_t;
Chris PeBenito 1852726
	')
Chris PeBenito 6b19be3
Chris PeBenito 296273a
	domtrans_pattern($1, thunderbird_exec_t, thunderbird_t)
Chris PeBenito 1852726
')