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