## Wireshark packet capture tool.
############################################################
##
## Role access for wireshark
##
##
##
## Role allowed access
##
##
##
##
## User domain for the role
##
##
#
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)
')
########################################
##
## Run wireshark in wireshark domain.
##
##
##
## Domain allowed to transition.
##
##
#
interface(`wireshark_domtrans',`
gen_require(`
type wireshark_t, wireshark_exec_t;
')
domtrans_pattern($1, wireshark_exec_t, wireshark_t)
')