|
Chris PeBenito |
339235 |
## <summary>Certmaster SSL certificate distribution service</summary>
|
|
Chris PeBenito |
339235 |
|
|
Chris PeBenito |
339235 |
########################################
|
|
Chris PeBenito |
339235 |
## <summary>
|
|
Chris PeBenito |
339235 |
## Execute a domain transition to run certmaster.
|
|
Chris PeBenito |
339235 |
## </summary>
|
|
Chris PeBenito |
339235 |
## <param name="domain">
|
|
Chris PeBenito |
339235 |
## <summary>
|
|
Chris PeBenito |
339235 |
## Domain allowed to transition.
|
|
Chris PeBenito |
339235 |
## </summary>
|
|
Chris PeBenito |
339235 |
## </param>
|
|
Chris PeBenito |
339235 |
#
|
|
Chris PeBenito |
339235 |
interface(`certmaster_domtrans',`
|
|
Chris PeBenito |
339235 |
gen_require(`
|
|
Chris PeBenito |
339235 |
type certmaster_t, certmaster_exec_t;
|
|
Chris PeBenito |
339235 |
')
|
|
Chris PeBenito |
339235 |
|
|
Chris PeBenito |
339235 |
domtrans_pattern($1, certmaster_exec_t, certmaster_t)
|
|
Chris PeBenito |
339235 |
')
|
|
Chris PeBenito |
339235 |
|
|
Dan Walsh |
3eaa99 |
####################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Execute certmaster.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Domain allowed access.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`certmaster_exec',`
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dan Walsh |
3eaa99 |
type certmaster_exec_t;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
can_exec($1, certmaster_exec_t)
|
|
Dan Walsh |
3eaa99 |
corecmd_search_bin($1)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Chris PeBenito |
339235 |
#######################################
|
|
Chris PeBenito |
339235 |
## <summary>
|
|
Chris PeBenito |
3f67f7 |
## read certmaster logs.
|
|
Chris PeBenito |
339235 |
## </summary>
|
|
Chris PeBenito |
339235 |
## <param name="domain">
|
|
Chris PeBenito |
3f67f7 |
## <summary>
|
|
Chris PeBenito |
3f67f7 |
## Domain allowed access.
|
|
Chris PeBenito |
3f67f7 |
## </summary>
|
|
Chris PeBenito |
339235 |
## </param>
|
|
Chris PeBenito |
339235 |
#
|
|
Chris PeBenito |
339235 |
interface(`certmaster_read_log',`
|
|
Chris PeBenito |
3f67f7 |
gen_require(`
|
|
Chris PeBenito |
3f67f7 |
type certmaster_var_log_t;
|
|
Chris PeBenito |
3f67f7 |
')
|
|
Chris PeBenito |
339235 |
|
|
Chris PeBenito |
3f67f7 |
read_files_pattern($1, certmaster_var_log_t, certmaster_var_log_t)
|
|
Chris PeBenito |
339235 |
logging_search_logs($1)
|
|
Chris PeBenito |
339235 |
')
|
|
Chris PeBenito |
339235 |
|
|
Chris PeBenito |
339235 |
#######################################
|
|
Chris PeBenito |
339235 |
## <summary>
|
|
Chris PeBenito |
3f67f7 |
## Append to certmaster logs.
|
|
Chris PeBenito |
339235 |
## </summary>
|
|
Chris PeBenito |
339235 |
## <param name="domain">
|
|
Chris PeBenito |
3f67f7 |
## <summary>
|
|
Chris PeBenito |
3f67f7 |
## Domain allowed access.
|
|
Chris PeBenito |
3f67f7 |
## </summary>
|
|
Chris PeBenito |
339235 |
## </param>
|
|
Chris PeBenito |
339235 |
#
|
|
Chris PeBenito |
339235 |
interface(`certmaster_append_log',`
|
|
Chris PeBenito |
3f67f7 |
gen_require(`
|
|
Chris PeBenito |
3f67f7 |
type certmaster_var_log_t;
|
|
Chris PeBenito |
3f67f7 |
')
|
|
Chris PeBenito |
339235 |
|
|
Chris PeBenito |
3f67f7 |
append_files_pattern($1, certmaster_var_log_t, certmaster_var_log_t)
|
|
Chris PeBenito |
339235 |
logging_search_logs($1)
|
|
Chris PeBenito |
339235 |
')
|
|
Chris PeBenito |
339235 |
|
|
Chris PeBenito |
339235 |
#######################################
|
|
Chris PeBenito |
339235 |
## <summary>
|
|
Chris PeBenito |
3f67f7 |
## Create, read, write, and delete
|
|
Chris PeBenito |
3f67f7 |
## certmaster logs.
|
|
Chris PeBenito |
339235 |
## </summary>
|
|
Chris PeBenito |
339235 |
## <param name="domain">
|
|
Chris PeBenito |
3f67f7 |
## <summary>
|
|
Chris PeBenito |
3f67f7 |
## Domain allowed access.
|
|
Chris PeBenito |
3f67f7 |
## </summary>
|
|
Chris PeBenito |
339235 |
## </param>
|
|
Chris PeBenito |
339235 |
#
|
|
Chris PeBenito |
339235 |
interface(`certmaster_manage_log',`
|
|
Chris PeBenito |
3f67f7 |
gen_require(`
|
|
Chris PeBenito |
3f67f7 |
type certmaster_var_log_t;
|
|
Chris PeBenito |
3f67f7 |
')
|
|
Chris PeBenito |
339235 |
|
|
Chris PeBenito |
3f67f7 |
manage_files_pattern($1, certmaster_var_log_t, certmaster_var_log_t)
|
|
Chris PeBenito |
3f67f7 |
manage_lnk_files_pattern($1, certmaster_var_log_t, certmaster_var_log_t)
|
|
Chris PeBenito |
339235 |
logging_search_logs($1)
|
|
Chris PeBenito |
339235 |
')
|
|
Chris PeBenito |
339235 |
|
|
Chris PeBenito |
339235 |
########################################
|
|
Chris PeBenito |
339235 |
## <summary>
|
|
Chris PeBenito |
339235 |
## All of the rules required to administrate
|
|
Chris PeBenito |
339235 |
## an snort environment
|
|
Chris PeBenito |
339235 |
## </summary>
|
|
Chris PeBenito |
339235 |
## <param name="domain">
|
|
Chris PeBenito |
339235 |
## <summary>
|
|
Chris PeBenito |
339235 |
## Domain allowed access.
|
|
Chris PeBenito |
339235 |
## </summary>
|
|
Chris PeBenito |
339235 |
## </param>
|
|
Chris PeBenito |
339235 |
## <param name="role">
|
|
Chris PeBenito |
339235 |
## <summary>
|
|
Chris PeBenito |
339235 |
## The role to be allowed to manage the syslog domain.
|
|
Chris PeBenito |
339235 |
## </summary>
|
|
Chris PeBenito |
339235 |
## </param>
|
|
Chris PeBenito |
339235 |
## <rolecap/>
|
|
Chris PeBenito |
339235 |
#
|
|
Chris PeBenito |
339235 |
interface(`certmaster_admin',`
|
|
Chris PeBenito |
339235 |
gen_require(`
|
|
Chris PeBenito |
339235 |
type certmaster_t, certmaster_var_run_t, certmaster_var_lib_t;
|
|
Chris PeBenito |
339235 |
type certmaster_etc_rw_t, certmaster_var_log_t;
|
|
Chris PeBenito |
339235 |
type certmaster_initrc_exec_t;
|
|
Chris PeBenito |
339235 |
')
|
|
Chris PeBenito |
339235 |
|
|
Chris PeBenito |
339235 |
allow $1 certmaster_t:process { ptrace signal_perms };
|
|
Chris PeBenito |
339235 |
ps_process_pattern($1, certmaster_t)
|
|
Chris PeBenito |
339235 |
|
|
Chris PeBenito |
339235 |
init_labeled_script_domtrans($1, certmaster_initrc_exec_t)
|
|
Chris PeBenito |
339235 |
domain_system_change_exemption($1)
|
|
Chris PeBenito |
339235 |
role_transition $2 certmaster_initrc_exec_t system_r;
|
|
Chris PeBenito |
339235 |
allow $2 system_r;
|
|
Chris PeBenito |
339235 |
|
|
Chris PeBenito |
339235 |
files_list_etc($1)
|
|
Chris PeBenito |
339235 |
miscfiles_manage_cert_dirs($1)
|
|
Chris PeBenito |
339235 |
miscfiles_manage_cert_files($1)
|
|
Chris PeBenito |
339235 |
|
|
Chris PeBenito |
339235 |
admin_pattern($1, certmaster_etc_rw_t)
|
|
Chris PeBenito |
339235 |
|
|
Chris PeBenito |
339235 |
files_list_pids($1)
|
|
Chris PeBenito |
339235 |
admin_pattern($1, certmaster_var_run_t)
|
|
Chris PeBenito |
339235 |
|
|
Chris PeBenito |
339235 |
logging_list_logs($1)
|
|
Chris PeBenito |
339235 |
admin_pattern($1, certmaster_var_log_t)
|
|
Chris PeBenito |
c0f5fa |
|
|
Chris PeBenito |
339235 |
files_list_var_lib($1)
|
|
Chris PeBenito |
339235 |
admin_pattern($1, certmaster_var_lib_t)
|
|
Chris PeBenito |
339235 |
')
|