## Conman is a program for connecting to remote consoles being managed by conmand
########################################
##
## Execute conman in the conman domin.
##
##
##
## Domain allowed to transition.
##
##
#
interface(`conman_domtrans',`
gen_require(`
type conman_t, conman_exec_t;
')
corecmd_search_bin($1)
domtrans_pattern($1, conman_exec_t, conman_t)
')
########################################
##
## Read conman's log files.
##
##
##
## Domain allowed access.
##
##
#
interface(`conman_read_log',`
gen_require(`
type conman_log_t;
')
logging_search_logs($1)
read_files_pattern($1, conman_log_t, conman_log_t)
')
########################################
##
## Append to conman log files.
##
##
##
## Domain allowed access.
##
##
#
interface(`conman_append_log',`
gen_require(`
type conman_log_t;
')
logging_search_logs($1)
append_files_pattern($1, conman_log_t, conman_log_t)
')
########################################
##
## Manage conman log files
##
##
##
## Domain allowed access.
##
##
#
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)
')
########################################
##
## Execute conman server in the conman domain.
##
##
##
## Domain allowed to transition.
##
##
#
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)
')
########################################
##
## All of the rules required to administrate
## an conman environment
##
##
##
## Domain allowed access.
##
##
##
#
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)
')
')