Chris PeBenito 9401ae1
## <summary>Cobbler installation server.</summary>
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Execute a domain transition to run cobblerd.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Domain allowed to transition.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`cobblerd_domtrans',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type cobblerd_t, cobblerd_exec_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Dominick Grift 14a248f
	corecmd_search_bin($1)
Chris PeBenito 9401ae1
	domtrans_pattern($1, cobblerd_exec_t, cobblerd_t)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Dominick Grift 14a248f
##	Execute cobblerd init scripts in
Dominick Grift 14a248f
##	the init script domain.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed to transition.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`cobblerd_initrc_domtrans',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type cobblerd_initrc_exec_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	init_labeled_script_domtrans($1, cobblerd_initrc_exec_t)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
eadf35e
eadf35e
eadf35e
########################################
eadf35e
## <summary>
eadf35e
##	Read cobbler configuration dirs.
eadf35e
## </summary>
eadf35e
## <param name="domain">
eadf35e
##	<summary>
eadf35e
##	Domain allowed access.
eadf35e
##	</summary>
eadf35e
## </param>
eadf35e
#
eadf35e
interface(`cobbler_list_config',`
eadf35e
	gen_require(`
eadf35e
		type cobbler_etc_t;
eadf35e
	')
eadf35e
eadf35e
	list_dirs_pattern($1, cobbler_etc_t, cobbler_etc_t)
eadf35e
	files_search_etc($1)
eadf35e
')
eadf35e
eadf35e
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Dominick Grift 14a248f
##	Read cobbler configuration files.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`cobbler_read_config',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type cobbler_etc_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	read_files_pattern($1, cobbler_etc_t, cobbler_etc_t)
Chris PeBenito 9401ae1
	files_search_etc($1)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Chris PeBenito 9401ae1
##	Do not audit attempts to read and write
Dominick Grift 14a248f
##	cobbler log files.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain to not audit.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`cobbler_dontaudit_rw_log',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type cobbler_var_log_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	dontaudit $1 cobbler_var_log_t:file rw_file_perms;
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Dominick Grift 14a248f
##	Search cobbler lib directories.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`cobbler_search_lib',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type cobbler_var_lib_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	files_search_var_lib($1)
Dominick Grift 14a248f
	search_dirs_pattern($1, cobbler_var_lib_t, cobbler_var_lib_t)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Dominick Grift 14a248f
##	Read cobbler lib files.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`cobbler_read_lib_files',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type cobbler_var_lib_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	files_search_var_lib($1)
Dominick Grift 14a248f
	read_files_pattern($1, cobbler_var_lib_t, cobbler_var_lib_t)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Dominick Grift 14a248f
##	Create, read, write, and delete
Dominick Grift 14a248f
##	cobbler lib files.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`cobbler_manage_lib_files',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type cobbler_var_lib_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	files_search_var_lib($1)
Dominick Grift 14a248f
	manage_files_pattern($1, cobbler_var_lib_t, cobbler_var_lib_t)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
## <summary>
Dominick Grift dabcb6b
##	All of the rules required to
Dominick Grift 14a248f
##	administrate an cobbler environment.
Chris PeBenito 9401ae1
## </summary>
Chris PeBenito 9401ae1
## <param name="domain">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Domain allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
## <param name="role">
Chris PeBenito 9401ae1
##	<summary>
Chris PeBenito 9401ae1
##	Role allowed access.
Chris PeBenito 9401ae1
##	</summary>
Chris PeBenito 9401ae1
## </param>
Chris PeBenito 9401ae1
## <rolecap/>
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
interface(`cobblerd_admin',`
Dominick Grift 14a248f
	refpolicywarn(`$0($*) has been deprecated, use cobbler_admin() instead.')
Dominick Grift 14a248f
	cobbler_admin($1, $2)
Dominick Grift 14a248f
')
Dominick Grift 14a248f
Dominick Grift 14a248f
########################################
Dominick Grift 14a248f
## <summary>
Dominick Grift 14a248f
##	All of the rules required to
Dominick Grift 14a248f
##	administrate an cobbler environment.
Dominick Grift 14a248f
## </summary>
Dominick Grift 14a248f
## <param name="domain">
Dominick Grift 14a248f
##	<summary>
Dominick Grift 14a248f
##	Domain allowed access.
Dominick Grift 14a248f
##	</summary>
Dominick Grift 14a248f
## </param>
Dominick Grift 14a248f
## <param name="role">
Dominick Grift 14a248f
##	<summary>
Dominick Grift 14a248f
##	Role allowed access.
Dominick Grift 14a248f
##	</summary>
Dominick Grift 14a248f
## </param>
Dominick Grift 14a248f
## <rolecap/>
Dominick Grift 14a248f
#
Dominick Grift 14a248f
interface(`cobbler_admin',`
Chris PeBenito 9401ae1
	gen_require(`
Chris PeBenito 9401ae1
		type cobblerd_t, cobbler_var_lib_t, cobbler_var_log_t;
Dominick Grift dabcb6b
		type cobbler_etc_t, cobblerd_initrc_exec_t, httpd_cobbler_content_t;
Dominick Grift dabcb6b
		type httpd_cobbler_content_ra_t, httpd_cobbler_content_rw_t, cobbler_tmp_t;
Chris PeBenito 9401ae1
	')
Chris PeBenito 9401ae1
Dominick Grift dabcb6b
	allow $1 cobblerd_t:process { ptrace signal_perms };
Dominick Grift dabcb6b
	ps_process_pattern($1, cobblerd_t)
Dominick Grift dabcb6b
Dominick Grift dabcb6b
	cobblerd_initrc_domtrans($1)
Dominick Grift dabcb6b
	domain_system_change_exemption($1)
Dominick Grift dabcb6b
	role_transition $2 cobblerd_initrc_exec_t system_r;
Dominick Grift dabcb6b
	allow $2 system_r;
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	files_search_etc($1)
Chris PeBenito 9401ae1
	admin_pattern($1, cobbler_etc_t)
Chris PeBenito 9401ae1
Dominick Grift dabcb6b
	files_search_tmp($1)
Dominick Grift dabcb6b
	admin_pattern($1, cobbler_tmp_t)
Dominick Grift dabcb6b
Dominick Grift dabcb6b
	files_search_var_lib($1)
Chris PeBenito 9401ae1
	admin_pattern($1, cobbler_var_lib_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
	logging_search_logs($1)
Chris PeBenito 9401ae1
	admin_pattern($1, cobbler_var_log_t)
Chris PeBenito 9401ae1
Dominick Grift dabcb6b
	apache_search_sys_content($1)
Dominick Grift dabcb6b
	admin_pattern($1, { httpd_cobbler_content_t httpd_cobbler_content_ra_t httpd_cobbler_content_rw_t })
Chris PeBenito 9401ae1
')