selinux-refpolicy/policy/modules/admin/mrtg.if
Chris PeBenito 69a403cd97 Rename *_var_run_t types to *_runtime_t.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2019-09-30 20:02:43 -04:00

85 lines
1.6 KiB
Plaintext

## <summary>Network traffic graphing.</summary>
########################################
## <summary>
## Read mrtg configuration
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`mrtg_read_config',`
gen_require(`
type mrtg_etc_t;
')
allow $1 mrtg_etc_t:file read_file_perms;
')
########################################
## <summary>
## Create and append mrtg log files.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`mrtg_append_create_logs',`
gen_require(`
type mrtg_log_t;
')
logging_search_logs($1)
append_files_pattern($1, mrtg_log_t, mrtg_log_t)
create_files_pattern($1, mrtg_log_t, mrtg_log_t)
')
########################################
## <summary>
## All of the rules required to
## administrate an mrtg environment.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
## <param name="role">
## <summary>
## Role allowed access.
## </summary>
## </param>
## <rolecap/>
#
interface(`mrtg_admin',`
gen_require(`
type mrtg_t, mrtg_runtime_t, mrtg_initrc_exec_t;
type mrtg_var_lib_t, mrtg_lock_t, mrtg_log_t;
type mrtg_etc_t;
')
allow $1 mrtg_t:process { ptrace signal_perms };
ps_process_pattern($1, mrtg_t)
init_startstop_service($1, $2, mrtg_t, mrtg_initrc_exec_t)
files_search_etc($1)
admin_pattern($1, mrtg_etc_t)
files_search_locks($1)
admin_pattern($1, mrtg_lock_t)
logging_search_logs($1)
admin_pattern($1, mrtg_log_t)
files_search_pids($1)
admin_pattern($1, mrtg_runtime_t)
files_search_var_lib($1)
admin_pattern($1, mrtg_var_lib_t)
')