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