## Subscription Management Certificate Daemon.
########################################
##
## Execute rhsmcertd in the rhsmcertd domain.
##
##
##
## 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 init scripts
## in the initrc domain.
##
##
##
## Domain allowed to transition.
##
##
#
interface(`rhsmcertd_initrc_domtrans',`
gen_require(`
type rhsmcertd_initrc_exec_t;
')
init_labeled_script_domtrans($1, rhsmcertd_initrc_exec_t)
')
########################################
##
## Read rhsmcertd 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 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)
')
########################################
##
## Create, read, write, and delete
## 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;
')
files_search_var_lib($1)
allow $1 rhsmcertd_var_lib_t:dir search_dir_perms;
')
########################################
##
## 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)
')
########################################
##
## Create, read, write, and delete
## 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)
')
########################################
##
## Create, read, write, and delete
## 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 with 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;
')
######################################
##
## Do not audit attempts to send
## and receive messages from
## rhsmcertd over dbus.
##
##
##
## Domain to not audit.
##
##
#
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, rhsmcertd_lock_t;
')
allow $1 rhsmcertd_t:process { ptrace signal_perms };
ps_process_pattern($1, rhsmcertd_t)
init_startstop_service($1, $2, rhsmcertd_t, rhsmcertd_initrc_exec_t)
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)
files_search_locks($1)
admin_pattern($1, rhsmcertd_lock_t)
')