Dominick Grift 1031ee
## <summary>Cobbler installation server.</summary>
Dominick Grift 1031ee
## <desc>
Dominick Grift 1031ee
##	

Dominick Grift 1031ee
##		Cobbler is a Linux installation server that allows for
Dominick Grift 1031ee
##		rapid setup of network installation environments. It
Dominick Grift 1031ee
##		glues together and automates many associated Linux
Dominick Grift 1031ee
##		tasks so you do not have to hop between lots of various
Dominick Grift 1031ee
##		commands and applications when rolling out new systems,
Dominick Grift 1031ee
##		and, in some cases, changing existing ones.
Dominick Grift 1031ee
##	

Dominick Grift 1031ee
## </desc>
Dominick Grift 1031ee
Dominick Grift 1031ee
########################################
Dominick Grift 1031ee
## <summary>
Chris PeBenito 27eab8
##	Execute a domain transition to run cobblerd.
Dominick Grift 1031ee
## </summary>
Dominick Grift 1031ee
## <param name="domain">
Chris PeBenito 27eab8
## <summary>
Chris PeBenito 27eab8
##	Domain allowed to transition.
Chris PeBenito 27eab8
## </summary>
Dominick Grift 1031ee
## </param>
Dominick Grift 1031ee
#
Chris PeBenito 27eab8
interface(`cobblerd_domtrans',`
Dominick Grift 1031ee
	gen_require(`
Chris PeBenito 27eab8
		type cobblerd_t, cobblerd_exec_t;
Dominick Grift 1031ee
	')
Dominick Grift 1031ee
Chris PeBenito 27eab8
	domtrans_pattern($1, cobblerd_exec_t, cobblerd_t)
Dominick Grift 1031ee
')
Dominick Grift 1031ee
Dominick Grift 1031ee
########################################
Dominick Grift 1031ee
## <summary>
Chris PeBenito 27eab8
##	Execute cobblerd server in the cobblerd domain.
Dominick Grift 1031ee
## </summary>
Dominick Grift 1031ee
## <param name="domain">
Dominick Grift 1031ee
##	<summary>
Chris PeBenito 27eab8
##	The type of the process performing this action.
Dominick Grift 1031ee
##	</summary>
Dominick Grift 1031ee
## </param>
Dominick Grift 1031ee
#
Chris PeBenito 27eab8
interface(`cobblerd_initrc_domtrans',`
Dominick Grift 1031ee
	gen_require(`
Chris PeBenito 27eab8
		type cobblerd_initrc_exec_t;
Dominick Grift 1031ee
	')
Dominick Grift 1031ee
Chris PeBenito 27eab8
	init_labeled_script_domtrans($1, cobblerd_initrc_exec_t)
Dominick Grift 1031ee
')
Dominick Grift 1031ee
Dominick Grift 1031ee
########################################
Dominick Grift 1031ee
## <summary>
Chris PeBenito 27eab8
##	Read Cobbler content in /etc
Dominick Grift 1031ee
## </summary>
Dominick Grift 1031ee
## <param name="domain">
Dominick Grift 1031ee
##	<summary>
Dominick Grift 1031ee
##	Domain allowed access.
Dominick Grift 1031ee
##	</summary>
Dominick Grift 1031ee
## </param>
Dominick Grift 1031ee
#
Chris PeBenito 27eab8
interface(`cobbler_read_config',`
Dominick Grift 1031ee
	gen_require(`
Chris PeBenito 27eab8
		type cobbler_etc_t;
Dominick Grift 1031ee
	')
Dominick Grift 1031ee
Chris PeBenito 27eab8
	read_files_pattern($1, cobbler_etc_t, cobbler_etc_t);
Chris PeBenito 27eab8
	files_search_etc($1)
Dominick Grift 1031ee
')
Dominick Grift 1031ee
Dominick Grift 1031ee
########################################
Dominick Grift 1031ee
## <summary>
Chris PeBenito 27eab8
##	Do not audit attempts to read and write
Chris PeBenito aeb7a4
##	Cobbler log files (leaked fd).
Dominick Grift 1031ee
## </summary>
Dominick Grift 1031ee
## <param name="domain">
Dominick Grift 1031ee
##	<summary>
Dominick Grift 1031ee
##	Domain allowed access.
Dominick Grift 1031ee
##	</summary>
Dominick Grift 1031ee
## </param>
Dominick Grift 1031ee
#
Chris PeBenito 27eab8
interface(`cobbler_dontaudit_rw_log',`
Dominick Grift 1031ee
	gen_require(`
Chris PeBenito 27eab8
		type cobbler_var_log_t;
Dominick Grift 1031ee
	')
Dominick Grift 1031ee
Chris PeBenito 27eab8
	dontaudit $1 cobbler_var_log_t:file rw_file_perms;
Dominick Grift 1031ee
')
Dominick Grift 1031ee
Dominick Grift 1031ee
########################################
Dominick Grift 1031ee
## <summary>
Dominick Grift 1031ee
##	Search cobbler dirs in /var/lib
Dominick Grift 1031ee
## </summary>
Dominick Grift 1031ee
## <param name="domain">
Dominick Grift 1031ee
##	<summary>
Dominick Grift 1031ee
##	Domain allowed access.
Dominick Grift 1031ee
##	</summary>
Dominick Grift 1031ee
## </param>
Dominick Grift 1031ee
#
Chris PeBenito 27eab8
interface(`cobbler_search_lib',`
Dominick Grift 1031ee
	gen_require(`
Dominick Grift 1031ee
		type cobbler_var_lib_t;
Dominick Grift 1031ee
	')
Dominick Grift 1031ee
Dominick Grift 1031ee
	search_dirs_pattern($1, cobbler_var_lib_t, cobbler_var_lib_t)
Dominick Grift 1031ee
	files_search_var_lib($1)
Dominick Grift 1031ee
')
Dominick Grift 1031ee
Dominick Grift 1031ee
########################################
Dominick Grift 1031ee
## <summary>
Chris PeBenito 27eab8
##	Read cobbler files in /var/lib
Dominick Grift 1031ee
## </summary>
Dominick Grift 1031ee
## <param name="domain">
Chris PeBenito 27eab8
##	<summary>
Chris PeBenito 27eab8
##	Domain allowed access.
Chris PeBenito 27eab8
##	</summary>
Dominick Grift 1031ee
## </param>
Dominick Grift 1031ee
#
Chris PeBenito 27eab8
interface(`cobbler_read_lib_files',`
Dominick Grift 1031ee
	gen_require(`
Chris PeBenito 27eab8
		type cobbler_var_lib_t;
Dominick Grift 1031ee
	')
Dominick Grift 1031ee
Chris PeBenito 27eab8
	read_files_pattern($1, cobbler_var_lib_t, cobbler_var_lib_t)
Chris PeBenito 27eab8
	files_search_var_lib($1)
Dominick Grift 1031ee
')
Dominick Grift 1031ee
Dominick Grift 1031ee
########################################
Dominick Grift 1031ee
## <summary>
Chris PeBenito 27eab8
##	Manage cobbler files in /var/lib
Dominick Grift 1031ee
## </summary>
Dominick Grift 1031ee
## <param name="domain">
Dominick Grift 1031ee
##	<summary>
Chris PeBenito 27eab8
##	Domain allowed access.
Dominick Grift 1031ee
##	</summary>
Dominick Grift 1031ee
## </param>
Dominick Grift 1031ee
#
Chris PeBenito 27eab8
interface(`cobbler_manage_lib_files',`
Dominick Grift 1031ee
	gen_require(`
Chris PeBenito 27eab8
		type cobbler_var_lib_t;
Dominick Grift 1031ee
	')
Dominick Grift 1031ee
Chris PeBenito 27eab8
	manage_files_pattern($1, cobbler_var_lib_t, cobbler_var_lib_t)
Chris PeBenito 27eab8
	files_search_var_lib($1)
Dominick Grift 1031ee
')
Dominick Grift 1031ee
Dominick Grift 1031ee
########################################
Dominick Grift 1031ee
## <summary>
Chris PeBenito aeb7a4
##	All of the rules required to administrate
Dominick Grift 1031ee
##	an cobblerd environment
Dominick Grift 1031ee
## </summary>
Dominick Grift 1031ee
## <param name="domain">
Dominick Grift 1031ee
##	<summary>
Dominick Grift 1031ee
##	Domain allowed access.
Dominick Grift 1031ee
##	</summary>
Dominick Grift 1031ee
## </param>
Dominick Grift 1031ee
## <param name="role">
Dominick Grift 1031ee
##	<summary>
Dominick Grift 1031ee
##	Role allowed access.
Dominick Grift 1031ee
##	</summary>
Dominick Grift 1031ee
## </param>
Dominick Grift 1031ee
## <rolecap/>
Dominick Grift 1031ee
#
Dominick Grift 1031ee
interface(`cobblerd_admin',`
Dominick Grift 1031ee
	gen_require(`
Dominick Grift 1031ee
		type cobblerd_t, cobbler_var_lib_t, cobbler_var_log_t;
Dominick Grift 183f79
		type cobbler_etc_t, cobblerd_initrc_exec_t;
Dominick Grift 1031ee
	')
Dominick Grift 1031ee
Dominick Grift 1031ee
	allow $1 cobblerd_t:process { ptrace signal_perms getattr };
Dominick Grift 1031ee
	read_files_pattern($1, cobblerd_t, cobblerd_t)
Dominick Grift 1031ee
Dominick Grift 1031ee
	files_search_etc($1)
Dominick Grift 1031ee
	admin_pattern($1, cobbler_etc_t)
Dominick Grift 1031ee
Dominick Grift 1031ee
	files_list_var_lib($1)
Dominick Grift 1031ee
	admin_pattern($1, cobbler_var_lib_t)
Dominick Grift 1031ee
Jeremy Solt a2524c
	logging_search_logs($1)
Dominick Grift 1031ee
	admin_pattern($1, cobbler_var_log_t)
Dominick Grift 1031ee
Jeremy Solt a2524c
	admin_pattern($1, httpd_cobbler_content_rw_t)
Jeremy Solt a2524c
Dominick Grift 1031ee
	cobblerd_initrc_domtrans($1)
Dominick Grift 1031ee
	domain_system_change_exemption($1)
Dominick Grift 1031ee
	role_transition $2 cobblerd_initrc_exec_t system_r;
Dominick Grift 1031ee
	allow $2 system_r;
Dominick Grift 1031ee
')