Chris PeBenito 9401ae1
## <summary>Wireshark packet capture tool.</summary>
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
############################################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Role access for wireshark
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="role">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Role allowed access
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	User domain for the role
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`wireshark_role',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type wireshark_t, wireshark_exec_t;
Chris PeBenito 9401ae1
		type wireshark_home_t, wireshark_tmp_t;
Chris PeBenito 9401ae1
		type wireshark_tmpfs_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	role $1 types wireshark_t;
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	domain_auto_trans($2, wireshark_exec_t, wireshark_t)
Chris PeBenito 9401ae1
	allow wireshark_t $2:fd use;
Chris PeBenito 9401ae1
	allow wireshark_t $2:process sigchld;
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	manage_dirs_pattern($2, wireshark_home_t, wireshark_home_t)
Chris PeBenito 9401ae1
	manage_files_pattern($2, wireshark_home_t, wireshark_home_t)
Chris PeBenito 9401ae1
	manage_lnk_files_pattern($2, wireshark_home_t, wireshark_home_t)
Chris PeBenito 9401ae1
	relabel_dirs_pattern($2, wireshark_home_t, wireshark_home_t)
Chris PeBenito 9401ae1
	relabel_files_pattern($2, wireshark_home_t, wireshark_home_t)
Chris PeBenito 9401ae1
	relabel_lnk_files_pattern($2, wireshark_home_t, wireshark_home_t)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Run wireshark in wireshark 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(`wireshark_domtrans',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type wireshark_t, wireshark_exec_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	domtrans_pattern($1, wireshark_exec_t, wireshark_t)
Chris PeBenito 9401ae1
')