## Subscription Management Certificate Daemon policy
########################################
##
## Transition to rhsmcertd.
##
##
##
## Domain allowed to transition.
##
##
#
interface(`rhsmcertd_domtrans',`
gen_require(`
type rhsmcertd_t, rhsmcertd_exec_t;
')
corecmd_search_bin($1)
domtrans_pattern($1, rhsmcertd_exec_t, rhsmcertd_t)
')
########################################
##
## Execute rhsmcertd server in the rhsmcertd domain.
##
##
##
## Domain allowed access.
##
##
#
interface(`rhsmcertd_initrc_domtrans',`
gen_require(`
type rhsmcertd_initrc_exec_t;
')
init_labeled_script_domtrans($1, rhsmcertd_initrc_exec_t)
')
########################################
##
## Read rhsmcertd's log files.
##
##
##
## Domain allowed access.
##
##
##
#
interface(`rhsmcertd_read_log',`
gen_require(`
type rhsmcertd_log_t;
')
logging_search_logs($1)
read_files_pattern($1, rhsmcertd_log_t, rhsmcertd_log_t)
')
########################################
##
## Append to rhsmcertd log files.
##
##
##
## Domain allowed access.
##
##
#
interface(`rhsmcertd_append_log',`
gen_require(`
type rhsmcertd_log_t;
')
logging_search_logs($1)
append_files_pattern($1, rhsmcertd_log_t, rhsmcertd_log_t)
')
########################################
##
## Manage rhsmcertd log files
##
##
##
## Domain allowed access.
##
##
#
interface(`rhsmcertd_manage_log',`
gen_require(`
type rhsmcertd_log_t;
')
logging_search_logs($1)
manage_dirs_pattern($1, rhsmcertd_log_t, rhsmcertd_log_t)
manage_files_pattern($1, rhsmcertd_log_t, rhsmcertd_log_t)
manage_lnk_files_pattern($1, rhsmcertd_log_t, rhsmcertd_log_t)
')
########################################
##
## Search rhsmcertd lib directories.
##
##
##
## Domain allowed access.
##
##
#
interface(`rhsmcertd_search_lib',`
gen_require(`
type rhsmcertd_var_lib_t;
')
allow $1 rhsmcertd_var_lib_t:dir search_dir_perms;
files_search_var_lib($1)
')
########################################
##
## Read rhsmcertd lib files.
##
##
##
## Domain allowed access.
##
##
#
interface(`rhsmcertd_read_lib_files',`
gen_require(`
type rhsmcertd_var_lib_t;
')
files_search_var_lib($1)
read_files_pattern($1, rhsmcertd_var_lib_t, rhsmcertd_var_lib_t)
')
########################################
##
## Manage rhsmcertd lib files.
##
##
##
## Domain allowed access.
##
##
#
interface(`rhsmcertd_manage_lib_files',`
gen_require(`
type rhsmcertd_var_lib_t;
')
files_search_var_lib($1)
manage_files_pattern($1, rhsmcertd_var_lib_t, rhsmcertd_var_lib_t)
')
########################################
##
## Manage rhsmcertd lib directories.
##
##
##
## Domain allowed access.
##
##
#
interface(`rhsmcertd_manage_lib_dirs',`
gen_require(`
type rhsmcertd_var_lib_t;
')
files_search_var_lib($1)
manage_dirs_pattern($1, rhsmcertd_var_lib_t, rhsmcertd_var_lib_t)
')
########################################
##
## Read rhsmcertd PID files.
##
##
##
## Domain allowed access.
##
##
#
interface(`rhsmcertd_read_pid_files',`
gen_require(`
type rhsmcertd_var_run_t;
')
files_search_pids($1)
allow $1 rhsmcertd_var_run_t:file read_file_perms;
')
####################################
##
## Connect to rhsmcertd over a unix domain
## stream socket.
##
##
##
## Domain allowed access.
##
##
#
interface(`rhsmcertd_stream_connect',`
gen_require(`
type rhsmcertd_t, rhsmcertd_var_run_t;
')
files_search_pids($1)
stream_connect_pattern($1, rhsmcertd_var_run_t, rhsmcertd_var_run_t, rhsmcertd_t)
')
#######################################
##
## Send and receive messages from
## rhsmcertd over dbus.
##
##
##
## Domain allowed access.
##
##
#
interface(`rhsmcertd_dbus_chat',`
gen_require(`
type rhsmcertd_t;
class dbus send_msg;
')
allow $1 rhsmcertd_t:dbus send_msg;
allow rhsmcertd_t $1:dbus send_msg;
')
######################################
##
## Dontaudit Send and receive messages from
## rhsmcertd over dbus.
##
##
##
## Domain allowed access.
##
##
#
interface(`rhsmcertd_dontaudit_dbus_chat',`
gen_require(`
type rhsmcertd_t;
class dbus send_msg;
')
dontaudit $1 rhsmcertd_t:dbus send_msg;
dontaudit rhsmcertd_t $1:dbus send_msg;
')
########################################
##
## All of the rules required to administrate
## an rhsmcertd environment
##
##
##
## Domain allowed access.
##
##
##
##
## Role allowed access.
##
##
##
#
interface(`rhsmcertd_admin',`
gen_require(`
type rhsmcertd_t, rhsmcertd_initrc_exec_t, rhsmcertd_log_t;
type rhsmcertd_var_lib_t, rhsmcertd_var_run_t;
')
allow $1 rhsmcertd_t:process signal_perms;
ps_process_pattern($1, rhsmcertd_t)
rhsmcertd_initrc_domtrans($1)
domain_system_change_exemption($1)
role_transition $2 rhsmcertd_initrc_exec_t system_r;
allow $2 system_r;
logging_search_logs($1)
admin_pattern($1, rhsmcertd_log_t)
files_search_var_lib($1)
admin_pattern($1, rhsmcertd_var_lib_t)
files_search_pids($1)
admin_pattern($1, rhsmcertd_var_run_t)
')