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