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">
Chris PeBenito cdbd09
## <summary>
Chris PeBenito cdbd09
##	Domain allowed to transition.
Chris PeBenito cdbd09
## </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">
Chris PeBenito cdbd09
## <summary>
Chris PeBenito cdbd09
##	Domain allowed to transition.
Chris PeBenito cdbd09
## </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">
Chris PeBenito cdbd09
## <summary>
Chris PeBenito cdbd09
##	Domain allowed acccess.
Chris PeBenito cdbd09
## </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">
Chris PeBenito 46e2fa
## <summary>
Chris PeBenito 46e2fa
##	Domain allowed to transition.
Chris PeBenito 46e2fa
## </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(`
Chris PeBenito cdbd09
		type prelude_t, prelude_spool_t;
Chris PeBenito cdbd09
		type prelude_var_run_t, prelude_var_lib_t;
Chris PeBenito cdbd09
		type prelude_audisp_t, prelude_audisp_var_run_t;
Chris PeBenito 46e2fa
		type prelude_initrc_exec_t;
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
		type prelude_lml_t, prelude_lml_tmp_t;
Chris PeBenito 46e2fa
		type prelude_lml_var_run_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
Chris PeBenito 46e2fa
	admin_pattern($1, prelude_spool_t)
Chris PeBenito 46e2fa
	admin_pattern($1, prelude_var_lib_t)
Chris PeBenito 46e2fa
	admin_pattern($1, prelude_var_run_t)
Chris PeBenito 46e2fa
	admin_pattern($1, prelude_audisp_var_run_t)
Chris PeBenito 46e2fa
	admin_pattern($1, prelude_lml_tmp_t)
Chris PeBenito 46e2fa
	admin_pattern($1, prelude_lml_var_run_t)
Chris PeBenito cdbd09
')