Chris PeBenito cdbd09
## <summary>Prelude hybrid intrusion detection system</summary>
Chris PeBenito cdbd09
Chris PeBenito cdbd09
########################################
Chris PeBenito cdbd09
## <summary>
Chris PeBenito cdbd09
##	Execute a domain transition to run prelude.
Chris PeBenito cdbd09
## </summary>
Chris PeBenito cdbd09
## <param name="domain">
Dominick Grift 2a7245
##	<summary>
Chris PeBenito cdbd09
##	Domain allowed to transition.
Dominick Grift 2a7245
##	</summary>
Chris PeBenito cdbd09
## </param>
Chris PeBenito cdbd09
#
Chris PeBenito cdbd09
interface(`prelude_domtrans',`
Chris PeBenito cdbd09
	gen_require(`
Chris PeBenito cdbd09
		type prelude_t, prelude_exec_t;
Chris PeBenito cdbd09
	')
Chris PeBenito cdbd09
Chris PeBenito cdbd09
	domtrans_pattern($1, prelude_exec_t, prelude_t)
Chris PeBenito cdbd09
')
Chris PeBenito cdbd09
Chris PeBenito cdbd09
########################################
Chris PeBenito cdbd09
## <summary>
Chris PeBenito cdbd09
##	Execute a domain transition to run prelude_audisp.
Chris PeBenito cdbd09
## </summary>
Chris PeBenito cdbd09
## <param name="domain">
Dominick Grift 2a7245
##	<summary>
Chris PeBenito cdbd09
##	Domain allowed to transition.
Dominick Grift 2a7245
##	</summary>
Chris PeBenito cdbd09
## </param>
Chris PeBenito cdbd09
#
Chris PeBenito cdbd09
interface(`prelude_domtrans_audisp',`
Chris PeBenito cdbd09
	gen_require(`
Chris PeBenito cdbd09
		type prelude_audisp_t, prelude_audisp_exec_t;
Chris PeBenito cdbd09
	')
Chris PeBenito cdbd09
Chris PeBenito cdbd09
	domtrans_pattern($1, prelude_audisp_exec_t, prelude_audisp_t)
Chris PeBenito cdbd09
')
Chris PeBenito cdbd09
Chris PeBenito cdbd09
########################################
Chris PeBenito cdbd09
## <summary>
Chris PeBenito cdbd09
##	Signal the prelude_audisp domain.
Chris PeBenito cdbd09
## </summary>
Chris PeBenito cdbd09
## <param name="domain">
Dominick Grift 2a7245
##	<summary>
Chris PeBenito cdbd09
##	Domain allowed acccess.
Dominick Grift 2a7245
##	</summary>
Chris PeBenito cdbd09
## </param>
Chris PeBenito cdbd09
#
Chris PeBenito cdbd09
interface(`prelude_signal_audisp',`
Chris PeBenito cdbd09
	gen_require(`
Chris PeBenito cdbd09
		type prelude_audisp_t;
Chris PeBenito cdbd09
	')
Chris PeBenito cdbd09
Chris PeBenito cdbd09
	allow $1 prelude_audisp_t:process signal;
Chris PeBenito cdbd09
')
Chris PeBenito cdbd09
Chris PeBenito cdbd09
########################################
Chris PeBenito cdbd09
## <summary>
Chris PeBenito 46e2fa
##	Read the prelude spool files
Chris PeBenito 46e2fa
## </summary>
Chris PeBenito 46e2fa
## <param name="domain">
Chris PeBenito 46e2fa
##	<summary>
Chris PeBenito 46e2fa
##	Domain allowed access.
Chris PeBenito 46e2fa
##	</summary>
Chris PeBenito 46e2fa
## </param>
Chris PeBenito 46e2fa
#
Chris PeBenito 46e2fa
interface(`prelude_read_spool',`
Chris PeBenito 46e2fa
	gen_require(`
Chris PeBenito 46e2fa
		type prelude_spool_t;
Chris PeBenito 46e2fa
	')
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
	files_search_spool($1)
Chris PeBenito 46e2fa
	read_files_pattern($1, prelude_spool_t, prelude_spool_t)
Chris PeBenito 46e2fa
')
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
########################################
Chris PeBenito 46e2fa
## <summary>
Chris PeBenito 46e2fa
##	Manage to prelude-manager spool files.
Chris PeBenito 46e2fa
## </summary>
Chris PeBenito 46e2fa
## <param name="domain">
Dominick Grift 2a7245
##	<summary>
Dominick Grift 288845
##	Domain allowed access.
Dominick Grift 2a7245
##	</summary>
Chris PeBenito 46e2fa
## </param>
Chris PeBenito 46e2fa
#
Chris PeBenito 46e2fa
interface(`prelude_manage_spool',`
Chris PeBenito 46e2fa
	gen_require(`
Chris PeBenito 46e2fa
		type prelude_spool_t;
Chris PeBenito 46e2fa
	')
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
	files_search_spool($1)
Chris PeBenito 46e2fa
	manage_dirs_pattern($1, prelude_spool_t, prelude_spool_t)
Chris PeBenito 46e2fa
	manage_files_pattern($1, prelude_spool_t, prelude_spool_t)
Chris PeBenito 46e2fa
')
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
########################################
Chris PeBenito 46e2fa
## <summary>
Chris PeBenito cdbd09
##	All of the rules required to administrate 
Chris PeBenito cdbd09
##	an prelude environment
Chris PeBenito cdbd09
## </summary>
Chris PeBenito cdbd09
## <param name="domain">
Chris PeBenito cdbd09
##	<summary>
Chris PeBenito cdbd09
##	Domain allowed access.
Chris PeBenito cdbd09
##	</summary>
Chris PeBenito cdbd09
## </param>
Chris PeBenito 46e2fa
## <param name="role">
Chris PeBenito 46e2fa
##	<summary>
Chris PeBenito 46e2fa
##	Role allowed access.
Chris PeBenito 46e2fa
##	</summary>
Chris PeBenito 46e2fa
## </param>
Chris PeBenito cdbd09
## <rolecap/>
Chris PeBenito cdbd09
#
Chris PeBenito cdbd09
interface(`prelude_admin',`
Chris PeBenito cdbd09
	gen_require(`
Dominick Grift 2528a2
		type prelude_t, prelude_spool_t, prelude_initrc_exec_t;
Dominick Grift 2528a2
		type prelude_var_run_t, prelude_var_lib_t, prelude_lml_var_run_t;
Dominick Grift 2528a2
		type prelude_audisp_t, prelude_audisp_var_run_t, prelude_lml_tmp_t;
Dominick Grift 2528a2
		type prelude_lml_t;
Chris PeBenito cdbd09
	')
Chris PeBenito cdbd09
Chris PeBenito cdbd09
	allow $1 prelude_t:process { ptrace signal_perms };
Chris PeBenito cdbd09
	ps_process_pattern($1, prelude_t)
Chris PeBenito cdbd09
Chris PeBenito cdbd09
	allow $1 prelude_audisp_t:process { ptrace signal_perms };
Chris PeBenito cdbd09
	ps_process_pattern($1, prelude_audisp_t)
Chris PeBenito cdbd09
Chris PeBenito 46e2fa
	allow $1 prelude_lml_t:process { ptrace signal_perms };
Chris PeBenito 46e2fa
	ps_process_pattern($1, prelude_lml_t)
Chris PeBenito cdbd09
Chris PeBenito 46e2fa
	init_labeled_script_domtrans($1, prelude_initrc_exec_t)
Chris PeBenito 46e2fa
	domain_system_change_exemption($1)
Chris PeBenito 46e2fa
	role_transition $2 prelude_initrc_exec_t system_r;
Chris PeBenito 46e2fa
	allow $2 system_r;
Chris PeBenito cdbd09
Dominick Grift 61f406
	files_list_spool($1)
Chris PeBenito 46e2fa
	admin_pattern($1, prelude_spool_t)
Dominick Grift 1215df
Dominick Grift 61f406
	files_list_var_lib($1)
Chris PeBenito 46e2fa
	admin_pattern($1, prelude_var_lib_t)
Dominick Grift 1215df
Dominick Grift 61f406
	files_list_pids($1)
Chris PeBenito 46e2fa
	admin_pattern($1, prelude_var_run_t)
Chris PeBenito 46e2fa
	admin_pattern($1, prelude_audisp_var_run_t)
Dominick Grift 3507be
	admin_pattern($1, prelude_lml_var_run_t)
Dominick Grift 1215df
Dominick Grift 61f406
	files_list_tmp($1)
Chris PeBenito 46e2fa
	admin_pattern($1, prelude_lml_tmp_t)
Chris PeBenito cdbd09
')