|
Chris PeBenito |
17de1b |
## <summary>Munin network-wide load graphing (formerly LRRD)</summary>
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Connect to munin over a unix domain
|
|
Chris PeBenito |
17de1b |
## stream socket.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`munin_stream_connect',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type munin_var_run_t, munin_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow $1 munin_t:unix_stream_socket connectto;
|
|
Chris PeBenito |
17de1b |
allow $1 munin_var_run_t:sock_file { getattr write };
|
|
Chris PeBenito |
17de1b |
files_search_pids($1)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
#######################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Read munin configuration files.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
bbcd3c |
## <rolecap/>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`munin_read_config',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type munin_etc_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow $1 munin_etc_t:dir list_dir_perms;
|
|
Chris PeBenito |
17de1b |
allow $1 munin_etc_t:file read_file_perms;
|
|
Chris PeBenito |
17de1b |
allow $1 munin_etc_t:lnk_file { getattr read };
|
|
Chris PeBenito |
17de1b |
files_search_etc($1)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
#######################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
da0423 |
## Append to the munin log.
|
|
Chris PeBenito |
da0423 |
## </summary>
|
|
Chris PeBenito |
da0423 |
## <param name="domain">
|
|
Chris PeBenito |
da0423 |
## <summary>
|
|
Chris PeBenito |
da0423 |
## Domain allowed access.
|
|
Chris PeBenito |
da0423 |
## </summary>
|
|
Chris PeBenito |
da0423 |
## </param>
|
|
Chris PeBenito |
da0423 |
## <rolecap/>
|
|
Chris PeBenito |
da0423 |
#
|
|
Chris PeBenito |
da0423 |
interface(`munin_append_log',`
|
|
Chris PeBenito |
da0423 |
gen_require(`
|
|
Chris PeBenito |
da0423 |
type munin_log_t;
|
|
Chris PeBenito |
da0423 |
')
|
|
Chris PeBenito |
da0423 |
|
|
Chris PeBenito |
da0423 |
logging_search_logs($1)
|
|
Chris PeBenito |
ce6fee |
allow $1 munin_log_t:dir list_dir_perms;
|
|
Chris PeBenito |
ce6fee |
append_files_pattern($1, munin_log_t, munin_log_t)
|
|
Chris PeBenito |
da0423 |
')
|
|
Chris PeBenito |
da0423 |
|
|
Chris PeBenito |
da0423 |
#######################################
|
|
Chris PeBenito |
da0423 |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Search munin library directories.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`munin_search_lib',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type munin_var_lib_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow $1 munin_var_lib_t:dir search_dir_perms;
|
|
Chris PeBenito |
17de1b |
files_search_var_lib($1)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
6c9118 |
|
|
Chris PeBenito |
6c9118 |
#######################################
|
|
Chris PeBenito |
6c9118 |
## <summary>
|
|
Chris PeBenito |
6c9118 |
## Do not audit attempts to search
|
|
Chris PeBenito |
6c9118 |
## munin library directories.
|
|
Chris PeBenito |
6c9118 |
## </summary>
|
|
Chris PeBenito |
6c9118 |
## <param name="domain">
|
|
Chris PeBenito |
6c9118 |
## <summary>
|
|
Chris PeBenito |
6c9118 |
## Domain allowed access.
|
|
Chris PeBenito |
6c9118 |
## </summary>
|
|
Chris PeBenito |
6c9118 |
## </param>
|
|
Chris PeBenito |
6c9118 |
#
|
|
Chris PeBenito |
6c9118 |
interface(`munin_dontaudit_search_lib',`
|
|
Chris PeBenito |
6c9118 |
gen_require(`
|
|
Chris PeBenito |
6c9118 |
type munin_var_lib_t;
|
|
Chris PeBenito |
6c9118 |
')
|
|
Chris PeBenito |
6c9118 |
|
|
Chris PeBenito |
6c9118 |
dontaudit $1 munin_var_lib_t:dir search_dir_perms;
|
|
Chris PeBenito |
6c9118 |
')
|
|
Chris PeBenito |
ce6fee |
|
|
Chris PeBenito |
ce6fee |
########################################
|
|
Chris PeBenito |
ce6fee |
## <summary>
|
|
Chris PeBenito |
ce6fee |
## All of the rules required to administrate
|
|
Chris PeBenito |
ce6fee |
## an munin environment
|
|
Chris PeBenito |
ce6fee |
## </summary>
|
|
Chris PeBenito |
ce6fee |
## <param name="domain">
|
|
Chris PeBenito |
ce6fee |
## <summary>
|
|
Chris PeBenito |
ce6fee |
## Domain allowed access.
|
|
Chris PeBenito |
ce6fee |
## </summary>
|
|
Chris PeBenito |
ce6fee |
## </param>
|
|
Chris PeBenito |
ce6fee |
## <param name="role">
|
|
Chris PeBenito |
ce6fee |
## <summary>
|
|
Chris PeBenito |
ce6fee |
## The role to be allowed to manage the munin domain.
|
|
Chris PeBenito |
ce6fee |
## </summary>
|
|
Chris PeBenito |
ce6fee |
## </param>
|
|
Chris PeBenito |
ce6fee |
## <rolecap/>
|
|
Chris PeBenito |
ce6fee |
#
|
|
Chris PeBenito |
ce6fee |
interface(`munin_admin',`
|
|
Chris PeBenito |
ce6fee |
gen_require(`
|
|
Chris PeBenito |
ce6fee |
type munin_t, munin_etc_t, munin_tmp_t;
|
|
Chris PeBenito |
ce6fee |
type munin_log_t, munin_var_lib_t, munin_var_run_t;
|
|
Chris PeBenito |
ce6fee |
type httpd_munin_content_t;
|
|
Chris PeBenito |
ce6fee |
type munin_initrc_exec_t;
|
|
Chris PeBenito |
ce6fee |
')
|
|
Chris PeBenito |
ce6fee |
|
|
Chris PeBenito |
ce6fee |
allow $1 munin_t:process { ptrace signal_perms };
|
|
Chris PeBenito |
ce6fee |
ps_process_pattern($1, munin_t)
|
|
Chris PeBenito |
ce6fee |
|
|
Chris PeBenito |
ce6fee |
init_labeled_script_domtrans($1, munin_initrc_exec_t)
|
|
Chris PeBenito |
ce6fee |
domain_system_change_exemption($1)
|
|
Chris PeBenito |
ce6fee |
role_transition $2 munin_initrc_exec_t system_r;
|
|
Chris PeBenito |
ce6fee |
allow $2 system_r;
|
|
Chris PeBenito |
ce6fee |
|
|
Chris PeBenito |
ce6fee |
files_list_tmp($1)
|
|
Chris PeBenito |
ce6fee |
admin_pattern($1, munin_tmp_t)
|
|
Chris PeBenito |
ce6fee |
|
|
Chris PeBenito |
ce6fee |
logging_list_logs($1)
|
|
Chris PeBenito |
ce6fee |
admin_pattern($1, munin_log_t)
|
|
Chris PeBenito |
ce6fee |
|
|
Chris PeBenito |
ce6fee |
files_list_etc($1)
|
|
Chris PeBenito |
ce6fee |
admin_pattern($1, munin_etc_t)
|
|
Chris PeBenito |
ce6fee |
|
|
Chris PeBenito |
ce6fee |
files_list_var_lib($1)
|
|
Chris PeBenito |
ce6fee |
admin_pattern($1, munin_var_lib_t)
|
|
Chris PeBenito |
ce6fee |
|
|
Chris PeBenito |
ce6fee |
files_list_pids($1)
|
|
Chris PeBenito |
ce6fee |
admin_pattern($1, munin_var_run_t)
|
|
Chris PeBenito |
ce6fee |
|
|
Chris PeBenito |
ce6fee |
admin_pattern($1, httpd_munin_content_t)
|
|
Chris PeBenito |
ce6fee |
')
|