Chris PeBenito 17de1b
## <summary>Ethernet activity monitor.</summary>
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Search arpwatch's data file directories.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`arpwatch_search_data',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type arpwatch_data_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito c0868a
	allow $1 arpwatch_data_t:dir search_dir_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Create arpwatch data files.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`arpwatch_manage_data_files',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type arpwatch_data_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
	manage_files_pattern($1, arpwatch_data_t, arpwatch_data_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read and write arpwatch temporary files.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`arpwatch_rw_tmp_files',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type arpwatch_tmp_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 arpwatch_tmp_t:file rw_file_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read and write arpwatch temporary files.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`arpwatch_manage_tmp_files',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type arpwatch_tmp_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 arpwatch_tmp_t:file manage_file_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Do not audit attempts to read and write
Chris PeBenito 17de1b
##	arpwatch packet sockets.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain to not audit.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`arpwatch_dontaudit_rw_packet_sockets',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type arpwatch_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	dontaudit $1 arpwatch_t:packet_socket { read write };
Chris PeBenito 17de1b
')
Chris PeBenito 5843d0
Chris PeBenito 5843d0
########################################
Chris PeBenito 5843d0
## <summary>
Chris PeBenito 5843d0
##	All of the rules required to administrate 
Chris PeBenito 5843d0
##	an arpwatch environment
Chris PeBenito 5843d0
## </summary>
Chris PeBenito 5843d0
## <param name="domain">
Chris PeBenito 5843d0
##	<summary>
Chris PeBenito 5843d0
##	Domain allowed access.
Chris PeBenito 5843d0
##	</summary>
Chris PeBenito 5843d0
## </param>
Chris PeBenito 5843d0
## <param name="role">
Chris PeBenito 5843d0
##	<summary>
Chris PeBenito 5843d0
##	The role to be allowed to manage the arpwatch domain.
Chris PeBenito 5843d0
##	</summary>
Chris PeBenito 5843d0
## </param>
Chris PeBenito 5843d0
## <rolecap/>
Chris PeBenito 5843d0
#
Chris PeBenito 5843d0
interface(`arpwatch_admin',`
Chris PeBenito 5843d0
	gen_require(`
Chris PeBenito 5843d0
		type arpwatch_t, arpwatch_tmp_t;
Chris PeBenito 5843d0
		type arpwatch_data_t, arpwatch_var_run_t;
Chris PeBenito 5843d0
		type arpwatch_initrc_exec_t;
Chris PeBenito 5843d0
	')
Chris PeBenito 5843d0
Chris PeBenito 5843d0
	allow $1 arpwatch_t:process { ptrace signal_perms getattr };
Chris PeBenito 5843d0
	ps_process_pattern($1, arpwatch_t)
Chris PeBenito 5843d0
Chris PeBenito 5843d0
	init_labeled_script_domtrans($1, arpwatch_initrc_exec_t)
Chris PeBenito 5843d0
	domain_system_change_exemption($1)
Chris PeBenito 5843d0
	role_transition $2 arpwatch_initrc_exec_t system_r;
Chris PeBenito 5843d0
	allow $2 system_r;
Chris PeBenito 5843d0
Chris PeBenito 5843d0
	files_list_tmp($1)
Chris PeBenito 5843d0
	admin_pattern($1, arpwatch_tmp_t)
Chris PeBenito 5843d0
Chris PeBenito 5843d0
	files_list_var($1)
Chris PeBenito 5843d0
	admin_pattern($1, arpwatch_data_t)
Chris PeBenito 5843d0
Chris PeBenito 5843d0
	files_list_pids($1)
Chris PeBenito 5843d0
	admin_pattern($1, arpwatch_var_run_t)
Chris PeBenito 5843d0
')