|
Chris PeBenito |
78f17e |
## <summary>APC UPS monitoring daemon</summary>
|
|
Chris PeBenito |
78f17e |
|
|
Chris PeBenito |
78f17e |
########################################
|
|
Chris PeBenito |
78f17e |
## <summary>
|
|
Chris PeBenito |
78f17e |
## Execute a domain transition to run apcupsd.
|
|
Chris PeBenito |
78f17e |
## </summary>
|
|
Chris PeBenito |
78f17e |
## <param name="domain">
|
|
Chris PeBenito |
78f17e |
## <summary>
|
|
Chris PeBenito |
78f17e |
## Domain allowed to transition.
|
|
Chris PeBenito |
78f17e |
## </summary>
|
|
Chris PeBenito |
78f17e |
## </param>
|
|
Chris PeBenito |
78f17e |
#
|
|
Chris PeBenito |
78f17e |
interface(`apcupsd_domtrans',`
|
|
Chris PeBenito |
78f17e |
gen_require(`
|
|
Chris PeBenito |
78f17e |
type apcupsd_t, apcupsd_exec_t;
|
|
Chris PeBenito |
78f17e |
')
|
|
Chris PeBenito |
78f17e |
|
|
Chris PeBenito |
0bfccd |
domtrans_pattern($1, apcupsd_exec_t, apcupsd_t)
|
|
Chris PeBenito |
78f17e |
')
|
|
Chris PeBenito |
78f17e |
|
|
Chris PeBenito |
78f17e |
########################################
|
|
Chris PeBenito |
78f17e |
## <summary>
|
|
Chris PeBenito |
78f17e |
## Read apcupsd PID files.
|
|
Chris PeBenito |
78f17e |
## </summary>
|
|
Chris PeBenito |
78f17e |
## <param name="domain">
|
|
Chris PeBenito |
78f17e |
## <summary>
|
|
Chris PeBenito |
78f17e |
## Domain allowed access.
|
|
Chris PeBenito |
78f17e |
## </summary>
|
|
Chris PeBenito |
78f17e |
## </param>
|
|
Chris PeBenito |
78f17e |
#
|
|
Chris PeBenito |
78f17e |
interface(`apcupsd_read_pid_files',`
|
|
Chris PeBenito |
78f17e |
gen_require(`
|
|
Chris PeBenito |
78f17e |
type apcupsd_var_run_t;
|
|
Chris PeBenito |
78f17e |
')
|
|
Chris PeBenito |
78f17e |
|
|
Chris PeBenito |
78f17e |
files_search_pids($1)
|
|
Chris PeBenito |
78f17e |
allow $1 apcupsd_var_run_t:file read_file_perms;
|
|
Chris PeBenito |
78f17e |
')
|
|
Chris PeBenito |
78f17e |
|
|
Chris PeBenito |
78f17e |
|
|
Chris PeBenito |
78f17e |
########################################
|
|
Chris PeBenito |
78f17e |
## <summary>
|
|
Chris PeBenito |
78f17e |
## Allow the specified domain to read apcupsd's log files.
|
|
Chris PeBenito |
78f17e |
## </summary>
|
|
Chris PeBenito |
78f17e |
## <param name="domain">
|
|
Chris PeBenito |
78f17e |
## <summary>
|
|
Chris PeBenito |
78f17e |
## Domain allowed access.
|
|
Chris PeBenito |
78f17e |
## </summary>
|
|
Chris PeBenito |
78f17e |
## </param>
|
|
Chris PeBenito |
78f17e |
## <rolecap/>
|
|
Chris PeBenito |
78f17e |
#
|
|
Chris PeBenito |
78f17e |
interface(`apcupsd_read_log',`
|
|
Chris PeBenito |
78f17e |
gen_require(`
|
|
Chris PeBenito |
78f17e |
type apcupsd_log_t;
|
|
Chris PeBenito |
78f17e |
')
|
|
Chris PeBenito |
78f17e |
|
|
Chris PeBenito |
78f17e |
logging_search_logs($1)
|
|
Chris PeBenito |
78f17e |
allow $1 apcupsd_log_t:dir list_dir_perms;
|
|
Chris PeBenito |
78f17e |
allow $1 apcupsd_log_t:file { read getattr lock };
|
|
Chris PeBenito |
78f17e |
')
|
|
Chris PeBenito |
78f17e |
|
|
Chris PeBenito |
78f17e |
########################################
|
|
Chris PeBenito |
78f17e |
## <summary>
|
|
Chris PeBenito |
78f17e |
## Allow the specified domain to append
|
|
Chris PeBenito |
78f17e |
## apcupsd log files.
|
|
Chris PeBenito |
78f17e |
## </summary>
|
|
Chris PeBenito |
78f17e |
## <param name="domain">
|
|
Chris PeBenito |
78f17e |
## <summary>
|
|
Chris PeBenito |
78f17e |
## Domain allowed to transition.
|
|
Chris PeBenito |
78f17e |
## </summary>
|
|
Chris PeBenito |
78f17e |
## </param>
|
|
Chris PeBenito |
78f17e |
#
|
|
Chris PeBenito |
78f17e |
interface(`apcupsd_append_log',`
|
|
Chris PeBenito |
78f17e |
gen_require(`
|
|
Chris PeBenito |
b34db7 |
type apcupsd_log_t;
|
|
Chris PeBenito |
78f17e |
')
|
|
Chris PeBenito |
78f17e |
|
|
Chris PeBenito |
78f17e |
logging_search_logs($1)
|
|
Chris PeBenito |
78f17e |
allow $1 apcupsd_log_t:dir list_dir_perms;
|
|
Chris PeBenito |
78f17e |
allow $1 apcupsd_log_t:file { getattr append };
|
|
Chris PeBenito |
78f17e |
')
|
|
Chris PeBenito |
72f82c |
|
|
Chris PeBenito |
72f82c |
########################################
|
|
Chris PeBenito |
72f82c |
## <summary>
|
|
Chris PeBenito |
72f82c |
## Execute a domain transition to run httpd_apcupsd_cgi_script.
|
|
Chris PeBenito |
72f82c |
## </summary>
|
|
Chris PeBenito |
72f82c |
## <param name="domain">
|
|
Chris PeBenito |
72f82c |
## <summary>
|
|
Chris PeBenito |
72f82c |
## Domain allowed to transition.
|
|
Chris PeBenito |
72f82c |
## </summary>
|
|
Chris PeBenito |
72f82c |
## </param>
|
|
Chris PeBenito |
72f82c |
#
|
|
Chris PeBenito |
859135 |
interface(`apcupsd_cgi_script_domtrans',`
|
|
Chris PeBenito |
72f82c |
gen_require(`
|
|
Chris PeBenito |
72f82c |
type httpd_apcupsd_cgi_script_t, httpd_apcupsd_cgi_script_exec_t;
|
|
Chris PeBenito |
72f82c |
')
|
|
Chris PeBenito |
72f82c |
|
|
Chris PeBenito |
0bfccd |
domtrans_pattern($1, httpd_apcupsd_cgi_script_exec_t, httpd_apcupsd_cgi_script_t)
|
|
Chris PeBenito |
72f82c |
')
|