diff --git a/policy/modules/services/apcupsd.if b/policy/modules/services/apcupsd.if index f30bf31..21eb32c 100644 --- a/policy/modules/services/apcupsd.if +++ b/policy/modules/services/apcupsd.if @@ -15,11 +15,30 @@ interface(`apcupsd_domtrans',` type apcupsd_t, apcupsd_exec_t; ') + corecmd_search_bin($1) domtrans_pattern($1, apcupsd_exec_t, apcupsd_t) ') ######################################## ## +## Execute apcupsd server in the apcupsd domain. +## +## +## +## The type of the process performing this action. +## +## +# +interface(`apcupsd_initrc_domtrans',` + gen_require(` + type apcupsd_initrc_exec_t; + ') + + init_labeled_script_domtrans($1, apcupsd_initrc_exec_t) +') + +######################################## +## ## Read apcupsd PID files. ## ## @@ -94,6 +113,11 @@ interface(`apcupsd_cgi_script_domtrans',` type httpd_apcupsd_cgi_script_t, httpd_apcupsd_cgi_script_exec_t; ') + optional_policy(` + apache_search_sys_content($1) + ') + + files_search_var($1) domtrans_pattern($1, httpd_apcupsd_cgi_script_exec_t, httpd_apcupsd_cgi_script_t) ') @@ -118,13 +142,13 @@ interface(`apcupsd_admin',` gen_require(` type apcupsd_t, apcupsd_tmp_t; type apcupsd_log_t, apcupsd_lock_t; - type apcupsd_var_run_t, apcupsd_initrc_exec_t; + type apcupsd_var_run_t; ') allow $1 apcupsd_t:process { ptrace signal_perms }; ps_process_pattern($1, apcupsd_t) - init_labeled_script_domtrans($1, apcupsd_initrc_exec_t) + apcupsd_initrc_domtrans($1, apcupsd_initrc_exec_t) domain_system_change_exemption($1) role_transition $2 apcupsd_initrc_exec_t system_r; allow $2 system_r;