## Generate debugging information for system.
########################################
##
## Execute a domain transition to run sosreport.
##
##
##
## Domain allowed to transition.
##
##
#
interface(`sosreport_domtrans',`
gen_require(`
type sosreport_t, sosreport_exec_t;
')
corecmd_search_bin($1)
domtrans_pattern($1, sosreport_exec_t, sosreport_t)
')
########################################
##
## Execute sosreport in the sosreport
## domain, and allow the specified
## role the sosreport domain.
##
##
##
## Domain allowed access.
##
##
##
##
## Role allowed access.
##
##
#
interface(`sosreport_run',`
gen_require(`
attribute_role sosreport_roles;
')
sosreport_domtrans($1)
roleattribute $2 sosreport_roles;
')
########################################
##
## Role access for sosreport.
##
##
##
## Role allowed access.
##
##
##
##
## User domain for the role.
##
##
#
interface(`sosreport_role',`
gen_require(`
type sosreport_t;
')
sosreport_run($2, $1)
allow $2 sosreport_t:process { ptrace signal_perms };
ps_process_pattern($2, sosreport_t)
')
########################################
##
## Read sosreport temporary files.
##
##
##
## Domain allowed access.
##
##
#
interface(`sosreport_read_tmp_files',`
gen_require(`
type sosreport_tmp_t;
')
files_search_tmp($1)
read_files_pattern($1, sosreport_tmp_t, sosreport_tmp_t)
')
########################################
##
## Append sosreport temporary files.
##
##
##
## Domain allowed access.
##
##
#
interface(`sosreport_append_tmp_files',`
gen_require(`
type sosreport_tmp_t;
')
files_search_tmp($1)
append_files_pattern($1, sosreport_tmp_t, sosreport_tmp_t)
')
########################################
##
## Delete sosreport temporary files.
##
##
##
## Domain allowed access.
##
##
#
interface(`sosreport_delete_tmp_files',`
gen_require(`
type sosreport_tmp_t;
')
files_delete_tmp_dir_entry($1)
delete_files_pattern($1, sosreport_tmp_t, sosreport_tmp_t)
')