144 lines
2.8 KiB
Text
144 lines
2.8 KiB
Text
|
## <summary>Conman is a program for connecting to remote consoles being managed by conmand</summary>
|
||
|
|
||
|
########################################
|
||
|
## <summary>
|
||
|
## Execute conman in the conman domin.
|
||
|
## </summary>
|
||
|
## <param name="domain">
|
||
|
## <summary>
|
||
|
## Domain allowed to transition.
|
||
|
## </summary>
|
||
|
## </param>
|
||
|
#
|
||
|
interface(`conman_domtrans',`
|
||
|
gen_require(`
|
||
|
type conman_t, conman_exec_t;
|
||
|
')
|
||
|
|
||
|
corecmd_search_bin($1)
|
||
|
domtrans_pattern($1, conman_exec_t, conman_t)
|
||
|
')
|
||
|
|
||
|
########################################
|
||
|
## <summary>
|
||
|
## Read conman's log files.
|
||
|
## </summary>
|
||
|
## <param name="domain">
|
||
|
## <summary>
|
||
|
## Domain allowed access.
|
||
|
## </summary>
|
||
|
## </param>
|
||
|
#
|
||
|
interface(`conman_read_log',`
|
||
|
gen_require(`
|
||
|
type conman_log_t;
|
||
|
')
|
||
|
|
||
|
logging_search_logs($1)
|
||
|
read_files_pattern($1, conman_log_t, conman_log_t)
|
||
|
')
|
||
|
|
||
|
########################################
|
||
|
## <summary>
|
||
|
## Append to conman log files.
|
||
|
## </summary>
|
||
|
## <param name="domain">
|
||
|
## <summary>
|
||
|
## Domain allowed access.
|
||
|
## </summary>
|
||
|
## </param>
|
||
|
#
|
||
|
interface(`conman_append_log',`
|
||
|
gen_require(`
|
||
|
type conman_log_t;
|
||
|
')
|
||
|
|
||
|
logging_search_logs($1)
|
||
|
append_files_pattern($1, conman_log_t, conman_log_t)
|
||
|
')
|
||
|
|
||
|
########################################
|
||
|
## <summary>
|
||
|
## Manage conman log files
|
||
|
## </summary>
|
||
|
## <param name="domain">
|
||
|
## <summary>
|
||
|
## Domain allowed access.
|
||
|
## </summary>
|
||
|
## </param>
|
||
|
#
|
||
|
interface(`conman_manage_log',`
|
||
|
gen_require(`
|
||
|
type conman_log_t;
|
||
|
')
|
||
|
|
||
|
logging_search_logs($1)
|
||
|
manage_dirs_pattern($1, conman_log_t, conman_log_t)
|
||
|
manage_files_pattern($1, conman_log_t, conman_log_t)
|
||
|
')
|
||
|
|
||
|
########################################
|
||
|
## <summary>
|
||
|
## Execute conman server in the conman domain.
|
||
|
## </summary>
|
||
|
## <param name="domain">
|
||
|
## <summary>
|
||
|
## Domain allowed to transition.
|
||
|
## </summary>
|
||
|
## </param>
|
||
|
#
|
||
|
interface(`conman_systemctl',`
|
||
|
gen_require(`
|
||
|
type conman_t;
|
||
|
type conman_unit_file_t;
|
||
|
')
|
||
|
|
||
|
systemd_exec_systemctl($1)
|
||
|
init_reload_services($1)
|
||
|
systemd_read_fifo_file_passwd_run($1)
|
||
|
allow $1 conman_unit_file_t:file read_file_perms;
|
||
|
allow $1 conman_unit_file_t:service manage_service_perms;
|
||
|
|
||
|
ps_process_pattern($1, conman_t)
|
||
|
')
|
||
|
|
||
|
|
||
|
########################################
|
||
|
## <summary>
|
||
|
## All of the rules required to administrate
|
||
|
## an conman environment
|
||
|
## </summary>
|
||
|
## <param name="domain">
|
||
|
## <summary>
|
||
|
## Domain allowed access.
|
||
|
## </summary>
|
||
|
## </param>
|
||
|
## <rolecap/>
|
||
|
#
|
||
|
interface(`conman_admin',`
|
||
|
gen_require(`
|
||
|
type conman_t;
|
||
|
type conman_log_t;
|
||
|
type conman_unit_file_t;
|
||
|
')
|
||
|
|
||
|
allow $1 conman_t:process { signal_perms };
|
||
|
ps_process_pattern($1, conman_t)
|
||
|
|
||
|
tunable_policy(`deny_ptrace',`',`
|
||
|
allow $1 conman_t:process ptrace;
|
||
|
')
|
||
|
|
||
|
logging_search_logs($1)
|
||
|
admin_pattern($1, conman_log_t)
|
||
|
|
||
|
conman_systemctl($1)
|
||
|
admin_pattern($1, conman_unit_file_t)
|
||
|
allow $1 conman_unit_file_t:service all_service_perms;
|
||
|
|
||
|
optional_policy(`
|
||
|
systemd_passwd_agent_exec($1)
|
||
|
systemd_read_fifo_file_passwd_run($1)
|
||
|
')
|
||
|
')
|