Chris PeBenito ff79b8
## <summary>Kismet is an 802.11 layer2 wireless network detector, sniffer, and intrusion detection system.</summary>
Chris PeBenito ff79b8
Chris PeBenito ff79b8
########################################
Chris PeBenito ff79b8
## <summary>
Chris PeBenito ff79b8
##	Execute a domain transition to run kismet.
Chris PeBenito ff79b8
## </summary>
Chris PeBenito ff79b8
## <param name="domain">
Chris PeBenito ff79b8
## <summary>
Chris PeBenito ff79b8
##	Domain allowed to transition.
Chris PeBenito ff79b8
## </summary>
Chris PeBenito ff79b8
## </param>
Chris PeBenito ff79b8
#
Chris PeBenito ff79b8
interface(`kismet_domtrans',`
Chris PeBenito ff79b8
	gen_require(`
Chris PeBenito ff79b8
		type kismet_t, kismet_exec_t;
Chris PeBenito ff79b8
	')
Chris PeBenito ff79b8
Chris PeBenito ff79b8
	domtrans_pattern($1, kismet_exec_t, kismet_t)
Chris PeBenito a9e967
	allow kismet_t $1:process signull;
Chris PeBenito ff79b8
')
Chris PeBenito ff79b8
Chris PeBenito ff79b8
########################################
Chris PeBenito ff79b8
## <summary>
Chris PeBenito ff79b8
##	Execute kismet in the kismet domain, and
Chris PeBenito ff79b8
##	allow the specified role the kismet domain.
Chris PeBenito ff79b8
## </summary>
Chris PeBenito ff79b8
## <param name="domain">
Chris PeBenito ff79b8
##	<summary>
Dominick Grift 77e4b5
##	Domain allowed to transition.
Chris PeBenito ff79b8
##	</summary>
Chris PeBenito ff79b8
## </param>
Chris PeBenito ff79b8
## <param name="role">
Chris PeBenito ff79b8
##	<summary>
Chris PeBenito a7ee7f
##	Role allowed access.
Chris PeBenito ff79b8
##	</summary>
Chris PeBenito ff79b8
## </param>
Chris PeBenito ff79b8
#
Chris PeBenito ff79b8
interface(`kismet_run',`
Chris PeBenito ff79b8
	gen_require(`
Chris PeBenito ff79b8
		type kismet_t;
Chris PeBenito ff79b8
	')
Chris PeBenito ff79b8
Chris PeBenito ff79b8
	kismet_domtrans($1)
Chris PeBenito ff79b8
	role $2 types kismet_t;
Chris PeBenito ff79b8
')
Chris PeBenito ff79b8
Chris PeBenito ff79b8
########################################
Chris PeBenito ff79b8
## <summary>
Chris PeBenito ff79b8
##	Read kismet PID files.
Chris PeBenito ff79b8
## </summary>
Chris PeBenito ff79b8
## <param name="domain">
Chris PeBenito ff79b8
##	<summary>
Chris PeBenito ff79b8
##	Domain allowed access.
Chris PeBenito ff79b8
##	</summary>
Chris PeBenito ff79b8
## </param>
Chris PeBenito ff79b8
#
Chris PeBenito ff79b8
interface(`kismet_read_pid_files',`
Chris PeBenito ff79b8
	gen_require(`
Chris PeBenito ff79b8
		type kismet_var_run_t;
Chris PeBenito ff79b8
	')
Chris PeBenito ff79b8
Chris PeBenito ff79b8
	allow $1 kismet_var_run_t:file read_file_perms;
Chris PeBenito ff79b8
	files_search_pids($1)
Chris PeBenito ff79b8
')
Chris PeBenito ff79b8
Chris PeBenito ff79b8
########################################
Chris PeBenito ff79b8
## <summary>
Chris PeBenito ff79b8
##	Manage kismet var_run files.
Chris PeBenito ff79b8
## </summary>
Chris PeBenito ff79b8
## <param name="domain">
Chris PeBenito ff79b8
##	<summary>
Chris PeBenito ff79b8
##	Domain allowed access.
Chris PeBenito ff79b8
##	</summary>
Chris PeBenito ff79b8
## </param>
Chris PeBenito ff79b8
#
Chris PeBenito ff79b8
interface(`kismet_manage_pid_files',`
Chris PeBenito ff79b8
	gen_require(`
Chris PeBenito ff79b8
		type kismet_var_run_t;
Chris PeBenito ff79b8
	')
Chris PeBenito ff79b8
Chris PeBenito ff79b8
	allow $1 kismet_var_run_t:file manage_file_perms;
Chris PeBenito ff79b8
	files_search_pids($1)	
Chris PeBenito ff79b8
')
Chris PeBenito ff79b8
Chris PeBenito ff79b8
########################################
Chris PeBenito ff79b8
## <summary>
Chris PeBenito ff79b8
##	Search kismet lib directories.
Chris PeBenito ff79b8
## </summary>
Chris PeBenito ff79b8
## <param name="domain">
Chris PeBenito ff79b8
##	<summary>
Chris PeBenito ff79b8
##	Domain allowed access.
Chris PeBenito ff79b8
##	</summary>
Chris PeBenito ff79b8
## </param>
Chris PeBenito ff79b8
#
Chris PeBenito ff79b8
interface(`kismet_search_lib',`
Chris PeBenito ff79b8
	gen_require(`
Chris PeBenito ff79b8
		type kismet_var_lib_t;
Chris PeBenito ff79b8
	')
Chris PeBenito ff79b8
Chris PeBenito ff79b8
	allow $1 kismet_var_lib_t:dir search_dir_perms;
Chris PeBenito ff79b8
	files_search_var_lib($1)
Chris PeBenito ff79b8
')
Chris PeBenito ff79b8
Chris PeBenito ff79b8
########################################
Chris PeBenito ff79b8
## <summary>
Chris PeBenito ff79b8
##	Read kismet lib files.
Chris PeBenito ff79b8
## </summary>
Chris PeBenito ff79b8
## <param name="domain">
Chris PeBenito ff79b8
##	<summary>
Chris PeBenito ff79b8
##	Domain allowed access.
Chris PeBenito ff79b8
##	</summary>
Chris PeBenito ff79b8
## </param>
Chris PeBenito ff79b8
#
Chris PeBenito ff79b8
interface(`kismet_read_lib_files',`
Chris PeBenito ff79b8
	gen_require(`
Chris PeBenito ff79b8
		type kismet_var_lib_t;
Chris PeBenito ff79b8
	')
Chris PeBenito ff79b8
Chris PeBenito ff79b8
	allow $1 kismet_var_lib_t:file read_file_perms;
Chris PeBenito ff79b8
	allow $1 kismet_var_lib_t:dir list_dir_perms;
Chris PeBenito ff79b8
	files_search_var_lib($1)
Chris PeBenito ff79b8
')
Chris PeBenito ff79b8
Chris PeBenito ff79b8
########################################
Chris PeBenito ff79b8
## <summary>
Chris PeBenito ff79b8
##	Create, read, write, and delete
Chris PeBenito ff79b8
##	kismet lib files.
Chris PeBenito ff79b8
## </summary>
Chris PeBenito ff79b8
## <param name="domain">
Chris PeBenito ff79b8
##	<summary>
Chris PeBenito ff79b8
##	Domain allowed access.
Chris PeBenito ff79b8
##	</summary>
Chris PeBenito ff79b8
## </param>
Chris PeBenito ff79b8
#
Chris PeBenito ff79b8
interface(`kismet_manage_lib_files',`
Chris PeBenito ff79b8
	gen_require(`
Chris PeBenito ff79b8
		type kismet_var_lib_t;
Chris PeBenito ff79b8
	')
Chris PeBenito ff79b8
Chris PeBenito ff79b8
	manage_files_pattern($1, kismet_var_lib_t, kismet_var_lib_t)
Chris PeBenito ff79b8
	files_search_var_lib($1)
Chris PeBenito ff79b8
')
Chris PeBenito ff79b8
Chris PeBenito ff79b8
########################################
Chris PeBenito ff79b8
## <summary>
Chris PeBenito ff79b8
##	Manage kismet var_lib files.
Chris PeBenito ff79b8
## </summary>
Chris PeBenito ff79b8
## <param name="domain">
Chris PeBenito ff79b8
##	<summary>
Chris PeBenito ff79b8
##	Domain allowed access.
Chris PeBenito ff79b8
##	</summary>
Chris PeBenito ff79b8
## </param>
Chris PeBenito ff79b8
#
Chris PeBenito ff79b8
interface(`kismet_manage_lib',`
Chris PeBenito ff79b8
	gen_require(`
Chris PeBenito ff79b8
		type kismet_var_lib_t;
Chris PeBenito ff79b8
	')
Chris PeBenito ff79b8
Chris PeBenito ff79b8
	manage_dirs_pattern($1, kismet_var_lib_t, kismet_var_lib_t)
Chris PeBenito ff79b8
	manage_files_pattern($1, kismet_var_lib_t, kismet_var_lib_t)
Chris PeBenito ff79b8
	manage_lnk_files_pattern($1, kismet_var_lib_t, kismet_var_lib_t)
Chris PeBenito ff79b8
')
Chris PeBenito ff79b8
Chris PeBenito ff79b8
########################################
Chris PeBenito ff79b8
## <summary>
Chris PeBenito ff79b8
##	Allow the specified domain to read kismet's log files.
Chris PeBenito ff79b8
## </summary>
Chris PeBenito ff79b8
## <param name="domain">
Chris PeBenito ff79b8
##	<summary>
Chris PeBenito ff79b8
##	Domain allowed access.
Chris PeBenito ff79b8
##	</summary>
Chris PeBenito ff79b8
## </param>
Chris PeBenito ff79b8
## <rolecap/>
Chris PeBenito ff79b8
#
Chris PeBenito ff79b8
interface(`kismet_read_log',`
Chris PeBenito ff79b8
	gen_require(`
Chris PeBenito ff79b8
		type kismet_log_t;
Chris PeBenito ff79b8
	')
Chris PeBenito ff79b8
Chris PeBenito ff79b8
	logging_search_logs($1)
Chris PeBenito ff79b8
	read_files_pattern($1, kismet_log_t, kismet_log_t)
Chris PeBenito ff79b8
')
Chris PeBenito ff79b8
Chris PeBenito ff79b8
########################################
Chris PeBenito ff79b8
## <summary>
Chris PeBenito ff79b8
##	Allow the specified domain to append
Chris PeBenito ff79b8
##	kismet log files.
Chris PeBenito ff79b8
## </summary>
Chris PeBenito ff79b8
## <param name="domain">
Chris PeBenito ff79b8
##	<summary>
Dominick Grift 77e4b5
##	Domain allowed access.
Chris PeBenito ff79b8
##	</summary>
Chris PeBenito ff79b8
## </param>
Chris PeBenito ff79b8
#
Chris PeBenito ff79b8
interface(`kismet_append_log',`
Chris PeBenito ff79b8
	gen_require(`
Chris PeBenito 147af4
		type kismet_log_t;
Chris PeBenito ff79b8
	')
Chris PeBenito ff79b8
Chris PeBenito ff79b8
	logging_search_logs($1)
Chris PeBenito ff79b8
	append_files_pattern($1, kismet_log_t, kismet_log_t)
Chris PeBenito ff79b8
')
Chris PeBenito ff79b8
Chris PeBenito ff79b8
########################################
Chris PeBenito ff79b8
## <summary>
Chris PeBenito ff79b8
##	Allow domain to manage kismet log files
Chris PeBenito ff79b8
## </summary>
Chris PeBenito ff79b8
## <param name="domain">
Chris PeBenito ff79b8
##	<summary>
Dominick Grift 77e4b5
##	Domain allowed access.
Chris PeBenito ff79b8
##	</summary>
Chris PeBenito ff79b8
## </param>
Chris PeBenito ff79b8
#
Chris PeBenito ff79b8
interface(`kismet_manage_log',`
Chris PeBenito ff79b8
	gen_require(`
Chris PeBenito ff79b8
		type kismet_log_t;
Chris PeBenito ff79b8
	')
Chris PeBenito ff79b8
Chris PeBenito ff79b8
	manage_dirs_pattern($1, kismet_log_t, kismet_log_t)
Chris PeBenito ff79b8
	manage_files_pattern($1, kismet_log_t, kismet_log_t)
Chris PeBenito ff79b8
	manage_lnk_files_pattern($1, kismet_log_t, kismet_log_t)
Chris PeBenito ff79b8
	logging_search_logs($1)
Chris PeBenito ff79b8
')
Chris PeBenito ff79b8
Chris PeBenito ff79b8
########################################
Chris PeBenito ff79b8
## <summary>
Chris PeBenito ff79b8
##	All of the rules required to administrate an kismet environment
Chris PeBenito ff79b8
## </summary>
Chris PeBenito ff79b8
## <param name="domain">
Chris PeBenito ff79b8
##	<summary>
Chris PeBenito ff79b8
##	Domain allowed access.
Chris PeBenito ff79b8
##	</summary>
Chris PeBenito ff79b8
## </param>
Chris PeBenito ff79b8
## <rolecap/>
Chris PeBenito ff79b8
#
Chris PeBenito ff79b8
interface(`kismet_admin',`
Chris PeBenito ff79b8
	gen_require(`
Chris PeBenito ff79b8
		type kismet_t;
Chris PeBenito ff79b8
	')
Chris PeBenito ff79b8
Chris PeBenito ff79b8
	ps_process_pattern($1, kismet_t)
Chris PeBenito ff79b8
	allow $1 kismet_t:process { ptrace signal_perms };
Chris PeBenito ff79b8
Chris PeBenito 147af4
	kismet_manage_pid_files($1)
Chris PeBenito 147af4
	kismet_manage_lib($1)
Chris PeBenito ff79b8
	kismet_manage_log($1)
Chris PeBenito ff79b8
')