2010-01-05 15:26:14 +00:00
|
|
|
## <summary>Cobbler installation server.</summary>
|
2010-08-26 16:55:57 +00:00
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## Cobbler is a Linux installation server that allows for
|
|
|
|
## rapid setup of network installation environments. It
|
|
|
|
## glues together and automates many associated Linux
|
|
|
|
## tasks so you do not have to hop between lots of various
|
|
|
|
## commands and applications when rolling out new systems,
|
|
|
|
## and, in some cases, changing existing ones.
|
|
|
|
## </p>
|
|
|
|
## </desc>
|
2010-01-05 15:26:14 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2010-02-08 18:38:48 +00:00
|
|
|
## Execute a domain transition to run cobblerd.
|
2010-01-05 15:26:14 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2010-02-08 18:38:48 +00:00
|
|
|
## <summary>
|
|
|
|
## Domain allowed to transition.
|
|
|
|
## </summary>
|
2010-01-05 15:26:14 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2010-02-08 18:38:48 +00:00
|
|
|
interface(`cobblerd_domtrans',`
|
2010-01-05 15:26:14 +00:00
|
|
|
gen_require(`
|
2010-02-08 18:38:48 +00:00
|
|
|
type cobblerd_t, cobblerd_exec_t;
|
2010-01-05 15:26:14 +00:00
|
|
|
')
|
|
|
|
|
2010-02-08 18:38:48 +00:00
|
|
|
domtrans_pattern($1, cobblerd_exec_t, cobblerd_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
corecmd_search_bin($1)
|
2010-01-05 15:26:14 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2010-02-08 18:38:48 +00:00
|
|
|
## Execute cobblerd server in the cobblerd domain.
|
2010-01-05 15:26:14 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-05 13:03:19 +00:00
|
|
|
## Domain allowed to transition.
|
2010-01-05 15:26:14 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2010-02-08 18:38:48 +00:00
|
|
|
interface(`cobblerd_initrc_domtrans',`
|
2010-01-05 15:26:14 +00:00
|
|
|
gen_require(`
|
2010-02-08 18:38:48 +00:00
|
|
|
type cobblerd_initrc_exec_t;
|
2010-01-05 15:26:14 +00:00
|
|
|
')
|
|
|
|
|
2010-02-08 18:38:48 +00:00
|
|
|
init_labeled_script_domtrans($1, cobblerd_initrc_exec_t)
|
2010-01-05 15:26:14 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2010-08-26 13:41:21 +00:00
|
|
|
## List Cobbler configuration.
|
2010-01-05 15:26:14 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2010-08-26 13:41:21 +00:00
|
|
|
interface(`cobbler_list_config',`
|
2010-01-05 15:26:14 +00:00
|
|
|
gen_require(`
|
2010-02-08 18:38:48 +00:00
|
|
|
type cobbler_etc_t;
|
2010-01-05 15:26:14 +00:00
|
|
|
')
|
|
|
|
|
2010-08-26 16:55:57 +00:00
|
|
|
list_dirs_pattern($1, cobbler_var_lib_t, cobbler_var_lib_t)
|
2010-02-08 18:38:48 +00:00
|
|
|
files_search_etc($1)
|
2010-01-05 15:26:14 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2010-08-26 13:41:21 +00:00
|
|
|
## Read Cobbler configuration files.
|
2010-01-05 15:26:14 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-05 13:03:19 +00:00
|
|
|
## Domain to not audit.
|
2010-01-05 15:26:14 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2010-08-26 13:41:21 +00:00
|
|
|
interface(`cobbler_read_config',`
|
2010-01-05 15:26:14 +00:00
|
|
|
gen_require(`
|
2010-08-26 13:41:21 +00:00
|
|
|
type cobbler_etc_t;
|
2010-01-05 15:26:14 +00:00
|
|
|
')
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
read_files_pattern($1, cobbler_etc_t, cobbler_etc_t)
|
|
|
|
files_search_etc($1)
|
2010-01-05 15:26:14 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2010-08-26 16:55:57 +00:00
|
|
|
## Search cobbler dirs in /var/lib
|
2010-01-05 15:26:14 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2010-08-26 16:55:57 +00:00
|
|
|
interface(`cobbler_search_lib',`
|
2010-01-05 15:26:14 +00:00
|
|
|
gen_require(`
|
2010-08-26 16:55:57 +00:00
|
|
|
type cobbler_var_lib_t;
|
2010-01-05 15:26:14 +00:00
|
|
|
')
|
|
|
|
|
2010-08-26 16:55:57 +00:00
|
|
|
search_dirs_pattern($1, cobbler_var_lib_t, cobbler_var_lib_t)
|
|
|
|
read_lnk_files_pattern($1, cobbler_var_lib_t, cobbler_var_lib_t)
|
2010-01-05 15:26:14 +00:00
|
|
|
files_search_var_lib($1)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2010-08-26 16:55:57 +00:00
|
|
|
## Read cobbler files in /var/lib
|
2010-01-05 15:26:14 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2010-02-08 18:38:48 +00:00
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
2010-01-05 15:26:14 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2010-08-26 16:55:57 +00:00
|
|
|
interface(`cobbler_read_lib_files',`
|
2010-01-05 15:26:14 +00:00
|
|
|
gen_require(`
|
2010-08-26 16:55:57 +00:00
|
|
|
type cobbler_var_lib_t;
|
2010-01-05 15:26:14 +00:00
|
|
|
')
|
|
|
|
|
2010-08-26 16:55:57 +00:00
|
|
|
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)
|
2010-02-08 18:38:48 +00:00
|
|
|
files_search_var_lib($1)
|
2010-01-05 15:26:14 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2010-08-26 16:55:57 +00:00
|
|
|
## Manage cobbler files in /var/lib
|
2010-01-05 15:26:14 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-02-08 18:38:48 +00:00
|
|
|
## Domain allowed access.
|
2010-01-05 15:26:14 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2010-08-26 16:55:57 +00:00
|
|
|
interface(`cobbler_manage_lib_files',`
|
2010-01-05 15:26:14 +00:00
|
|
|
gen_require(`
|
2010-08-26 16:55:57 +00:00
|
|
|
type cobbler_var_lib_t;
|
2010-01-05 15:26:14 +00:00
|
|
|
')
|
|
|
|
|
2010-08-26 16:55:57 +00:00
|
|
|
manage_dirs_pattern($1, cobbler_var_lib_t, cobbler_var_lib_t)
|
|
|
|
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)
|
2010-02-08 18:38:48 +00:00
|
|
|
files_search_var_lib($1)
|
2010-01-05 15:26:14 +00:00
|
|
|
')
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to read and write
|
|
|
|
## Cobbler log files (leaked fd).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`cobbler_dontaudit_rw_log',`
|
|
|
|
gen_require(`
|
|
|
|
type cobbler_var_log_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 cobbler_var_log_t:file rw_inherited_file_perms;
|
|
|
|
')
|
|
|
|
|
2010-01-05 15:26:14 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2010-05-11 12:23:02 +00:00
|
|
|
## All of the rules required to administrate
|
2010-01-05 15:26:14 +00:00
|
|
|
## an cobblerd environment
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
|
|
|
## <summary>
|
|
|
|
## Role allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`cobblerd_admin',`
|
|
|
|
gen_require(`
|
2010-08-26 16:55:57 +00:00
|
|
|
type cobblerd_t, cobbler_var_lib_t, cobbler_var_log_t;
|
|
|
|
type cobbler_etc_t, cobblerd_initrc_exec_t;
|
|
|
|
type httpd_cobbler_content_t;
|
|
|
|
type httpd_cobbler_content_ra_t;
|
|
|
|
type httpd_cobbler_content_rw_t;
|
2010-01-05 15:26:14 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 cobblerd_t:process { ptrace signal_perms getattr };
|
|
|
|
read_files_pattern($1, cobblerd_t, cobblerd_t)
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
files_search_etc($1)
|
2010-08-26 16:55:57 +00:00
|
|
|
admin_pattern($1, cobbler_etc_t)
|
2010-01-05 15:26:14 +00:00
|
|
|
|
|
|
|
files_list_var_lib($1)
|
2010-08-26 16:55:57 +00:00
|
|
|
admin_pattern($1, cobbler_var_lib_t)
|
2010-01-05 15:26:14 +00:00
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
logging_search_logs($1)
|
2010-08-26 16:55:57 +00:00
|
|
|
admin_pattern($1, cobbler_var_log_t)
|
2010-01-05 15:26:14 +00:00
|
|
|
|
2010-08-26 16:55:57 +00:00
|
|
|
apache_search_sys_content($1)
|
|
|
|
admin_pattern($1, httpd_cobbler_content_t)
|
|
|
|
admin_pattern($1, httpd_cobbler_content_ra_t)
|
|
|
|
admin_pattern($1, httpd_cobbler_content_rw_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
|
2010-08-26 16:55:57 +00:00
|
|
|
cobblerd_initrc_domtrans($1)
|
|
|
|
domain_system_change_exemption($1)
|
|
|
|
role_transition $2 cobblerd_initrc_exec_t system_r;
|
|
|
|
allow $2 system_r;
|
2010-08-26 13:41:21 +00:00
|
|
|
|
|
|
|
optional_policy(`
|
2010-08-26 16:55:57 +00:00
|
|
|
# traverse /var/lib/tftpdir to get to cobbler_var_lib_t there.
|
2010-08-26 13:41:21 +00:00
|
|
|
tftp_search_rw_content($1)
|
|
|
|
')
|
2010-01-05 15:26:14 +00:00
|
|
|
')
|