## policy for numad
########################################
##
## Transition to numad.
##
##
##
## Domain allowed to transition.
##
##
#
interface(`numad_domtrans',`
gen_require(`
type numad_t, numad_exec_t;
')
corecmd_search_bin($1)
domtrans_pattern($1, numad_exec_t, numad_t)
')
########################################
##
## Execute numad server in the numad domain.
##
##
##
## Domain allowed to transition.
##
##
#
interface(`numad_systemctl',`
gen_require(`
type numad_t;
type numad_unit_file_t;
')
systemd_exec_systemctl($1)
init_reload_services($1)
systemd_read_fifo_file_passwd_run($1)
allow $1 numad_unit_file_t:file read_file_perms;
allow $1 numad_unit_file_t:service all_service_perms;
ps_process_pattern($1, numad_t)
')
########################################
##
## Send and receive messages from
## numad over dbus.
##
##
##
## Domain allowed access.
##
##
#
interface(`numad_dbus_chat',`
gen_require(`
type numad_t;
class dbus send_msg;
')
allow $1 numad_t:dbus send_msg;
allow numad_t $1:dbus send_msg;
')
########################################
##
## All of the rules required to administrate
## an numad environment
##
##
##
## Domain allowed access.
##
##
#
interface(`numad_admin',`
gen_require(`
type numad_t;
type numad_unit_file_t;
')
allow $1 numad_t:process { ptrace signal_perms };
ps_process_pattern($1, numad_t)
numad_systemctl($1)
optional_policy(`
systemd_passwd_agent_exec($1)
systemd_read_fifo_file_passwd_run($1)
')
')