Chris PeBenito 6e2123
## <summary>Wireshark packet capture tool.</summary>
Chris PeBenito 6e2123
Chris PeBenito 296273
############################################################
Chris PeBenito 6e2123
## <summary>
Chris PeBenito 296273
##	Role access for wireshark
Chris PeBenito 6e2123
## </summary>
Chris PeBenito 296273
## <param name="role">
Chris PeBenito 6e2123
##	<summary>
Chris PeBenito 296273
##	Role allowed access
Chris PeBenito 6e2123
##	</summary>
Chris PeBenito 6e2123
## </param>
Chris PeBenito 296273
## <param name="domain">
Chris PeBenito 6e2123
##	<summary>
Chris PeBenito 296273
##	User domain for the role
Chris PeBenito 6e2123
##	</summary>
Chris PeBenito 6e2123
## </param>
Chris PeBenito 6e2123
#
Chris PeBenito 296273
interface(`wireshark_role',`
Chris PeBenito 6e2123
	gen_require(`
Chris PeBenito 296273
		type wireshark_t, wireshark_exec_t;
Chris PeBenito 296273
		type wireshark_home_t, wireshark_tmp_t;
Chris PeBenito 296273
		type wireshark_tmpfs_t;
Chris PeBenito 6e2123
	')
Chris PeBenito 6e2123
Chris PeBenito 296273
	role $1 types wireshark_t;
Chris PeBenito 6e2123
Chris PeBenito 296273
	domain_auto_trans($2, wireshark_exec_t, wireshark_t)
Chris PeBenito 296273
	allow wireshark_t $2:fd use;
Chris PeBenito 296273
	allow wireshark_t $2:process sigchld;
Chris PeBenito 2a9837
Chris PeBenito 296273
	manage_dirs_pattern($2, wireshark_home_t, wireshark_home_t)
Chris PeBenito 296273
	manage_files_pattern($2, wireshark_home_t, wireshark_home_t)
Chris PeBenito 296273
	manage_lnk_files_pattern($2, wireshark_home_t, wireshark_home_t)
Chris PeBenito 296273
	relabel_dirs_pattern($2, wireshark_home_t, wireshark_home_t)
Chris PeBenito 296273
	relabel_files_pattern($2, wireshark_home_t, wireshark_home_t)
Chris PeBenito 296273
	relabel_lnk_files_pattern($2, wireshark_home_t, wireshark_home_t)
Chris PeBenito 6e2123
')
Chris PeBenito 6e2123
Chris PeBenito 6e2123
########################################
Chris PeBenito 6e2123
## <summary>
Chris PeBenito 6e2123
##	Run wireshark in wireshark domain.
Chris PeBenito 6e2123
## </summary>
Chris PeBenito 6e2123
## <param name="domain">
Chris PeBenito 6e2123
##	<summary>
Dominick Grift 03b866
##	Domain allowed to transition.
Chris PeBenito 6e2123
##	</summary>
Chris PeBenito 6e2123
## </param>
Chris PeBenito 6e2123
#
Chris PeBenito 296273
interface(`wireshark_domtrans',`
Chris PeBenito 6e2123
	gen_require(`
Chris PeBenito 296273
		type wireshark_t, wireshark_exec_t;
Chris PeBenito 6e2123
	')
Chris PeBenito 6e2123
Chris PeBenito 296273
	domtrans_pattern($1, wireshark_exec_t, wireshark_t)
Chris PeBenito 6e2123
')