|
Chris PeBenito |
4483ee |
## <summary>Advanced power management daemon</summary>
|
|
Chris PeBenito |
4483ee |
|
|
Chris PeBenito |
4483ee |
########################################
|
|
Chris PeBenito |
4483ee |
## <summary>
|
|
Chris PeBenito |
4483ee |
## Execute APM in the apm domain.
|
|
Chris PeBenito |
4483ee |
## </summary>
|
|
Chris PeBenito |
4483ee |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
4483ee |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
4483ee |
## </param>
|
|
Chris PeBenito |
4483ee |
#
|
|
Chris PeBenito |
4483ee |
interface(`apm_domtrans_client',`
|
|
Chris PeBenito |
4483ee |
gen_require(`
|
|
Chris PeBenito |
4483ee |
type apm_t, apm_exec_t;
|
|
Chris PeBenito |
4483ee |
')
|
|
Chris PeBenito |
4483ee |
|
|
Chris PeBenito |
4483ee |
corecmd_search_bin($1)
|
|
Chris PeBenito |
4483ee |
domain_auto_trans($1,apm_exec_t,apm_t)
|
|
Chris PeBenito |
4483ee |
|
|
Chris PeBenito |
4483ee |
allow $1 apm_t:fd use;
|
|
Chris PeBenito |
4483ee |
allow apm_t $1:fd use;
|
|
Chris PeBenito |
4483ee |
allow apm_t $1:fifo_file rw_file_perms;
|
|
Chris PeBenito |
4483ee |
allow apm_t $1:process sigchld;
|
|
Chris PeBenito |
4483ee |
')
|
|
Chris PeBenito |
4483ee |
|
|
Chris PeBenito |
4483ee |
########################################
|
|
Chris PeBenito |
4483ee |
## <summary>
|
|
Chris PeBenito |
4483ee |
## Use file descriptors for apmd.
|
|
Chris PeBenito |
4483ee |
## </summary>
|
|
Chris PeBenito |
4483ee |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
4483ee |
## The type of the process performing this action.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
4483ee |
## </param>
|
|
Chris PeBenito |
4483ee |
#
|
|
Chris PeBenito |
1c1ac6 |
interface(`apm_use_fds',`
|
|
Chris PeBenito |
4483ee |
gen_require(`
|
|
Chris PeBenito |
4483ee |
type apmd_t;
|
|
Chris PeBenito |
4483ee |
')
|
|
Chris PeBenito |
4483ee |
|
|
Chris PeBenito |
4483ee |
allow $1 apmd_t:fd use;
|
|
Chris PeBenito |
4483ee |
')
|
|
Chris PeBenito |
4483ee |
|
|
Chris PeBenito |
4483ee |
########################################
|
|
Chris PeBenito |
4483ee |
## <summary>
|
|
Chris PeBenito |
4483ee |
## Write to apmd unnamed pipes.
|
|
Chris PeBenito |
4483ee |
## </summary>
|
|
Chris PeBenito |
4483ee |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
4483ee |
## The type of the process performing this action.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
4483ee |
## </param>
|
|
Chris PeBenito |
4483ee |
#
|
|
Chris PeBenito |
1815ba |
interface(`apm_write_pipes',`
|
|
Chris PeBenito |
4483ee |
gen_require(`
|
|
Chris PeBenito |
4483ee |
type apmd_t;
|
|
Chris PeBenito |
4483ee |
')
|
|
Chris PeBenito |
4483ee |
|
|
Chris PeBenito |
4483ee |
allow $1 apmd_t:fifo_file write;
|
|
Chris PeBenito |
4483ee |
')
|
|
Chris PeBenito |
4483ee |
|
|
Chris PeBenito |
4483ee |
########################################
|
|
Chris PeBenito |
4483ee |
## <summary>
|
|
Chris PeBenito |
4483ee |
## Read and write to an apm unix stream socket.
|
|
Chris PeBenito |
4483ee |
## </summary>
|
|
Chris PeBenito |
4483ee |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
4483ee |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
4483ee |
## </param>
|
|
Chris PeBenito |
4483ee |
#
|
|
Chris PeBenito |
1815ba |
interface(`apm_rw_stream_sockets',`
|
|
Chris PeBenito |
4483ee |
gen_require(`
|
|
Chris PeBenito |
4483ee |
type apmd_t;
|
|
Chris PeBenito |
4483ee |
')
|
|
Chris PeBenito |
4483ee |
|
|
Chris PeBenito |
4483ee |
allow $1 apmd_t:unix_stream_socket { read write };
|
|
Chris PeBenito |
4483ee |
')
|
|
Chris PeBenito |
4483ee |
|
|
Chris PeBenito |
4483ee |
########################################
|
|
Chris PeBenito |
4483ee |
## <summary>
|
|
Chris PeBenito |
4483ee |
## Append to apm's log file.
|
|
Chris PeBenito |
4483ee |
## </summary>
|
|
Chris PeBenito |
4483ee |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
4483ee |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
4483ee |
## </param>
|
|
Chris PeBenito |
4483ee |
#
|
|
Chris PeBenito |
4483ee |
interface(`apm_append_log',`
|
|
Chris PeBenito |
4483ee |
gen_require(`
|
|
Chris PeBenito |
4483ee |
type apmd_log_t;
|
|
Chris PeBenito |
4483ee |
')
|
|
Chris PeBenito |
4483ee |
|
|
Chris PeBenito |
4483ee |
logging_search_logs($1)
|
|
Chris PeBenito |
4483ee |
allow $1 apmd_log_t:file append;
|
|
Chris PeBenito |
4483ee |
')
|
|
Chris PeBenito |
725926 |
|
|
Chris PeBenito |
725926 |
########################################
|
|
Chris PeBenito |
725926 |
## <summary>
|
|
Chris PeBenito |
725926 |
## Connect to apmd over an unix stream socket.
|
|
Chris PeBenito |
725926 |
## </summary>
|
|
Chris PeBenito |
725926 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
725926 |
## </param>
|
|
Chris PeBenito |
725926 |
#
|
|
Chris PeBenito |
725926 |
interface(`apm_stream_connect',`
|
|
Chris PeBenito |
725926 |
gen_require(`
|
|
Chris PeBenito |
9fd4b8 |
type apmd_t, apmd_var_run_t;
|
|
Chris PeBenito |
725926 |
')
|
|
Chris PeBenito |
725926 |
|
|
Chris PeBenito |
725926 |
files_search_pids($1)
|
|
Chris PeBenito |
725926 |
allow $1 apmd_var_run_t:sock_file write;
|
|
Chris PeBenito |
725926 |
allow $1 apmd_t:unix_stream_socket connectto;
|
|
Chris PeBenito |
725926 |
')
|