|
Chris PeBenito |
9a66d4 |
## <summary>Berkeley process accounting</summary>
|
|
Chris PeBenito |
9a66d4 |
|
|
Chris PeBenito |
9a66d4 |
########################################
|
|
Chris PeBenito |
9a66d4 |
## <summary>
|
|
Chris PeBenito |
9a66d4 |
## Transition to the accounting management domain.
|
|
Chris PeBenito |
9a66d4 |
## </summary>
|
|
Chris PeBenito |
9a66d4 |
## <param name="domain">
|
|
Chris PeBenito |
9a66d4 |
## Domain allowed access.
|
|
Chris PeBenito |
9a66d4 |
## </param>
|
|
Chris PeBenito |
9a66d4 |
#
|
|
Chris PeBenito |
9a66d4 |
interface(`acct_domtrans',`
|
|
Chris PeBenito |
9a66d4 |
gen_require(`
|
|
Chris PeBenito |
9a66d4 |
type acct_t, acct_exec_t;
|
|
Chris PeBenito |
9a66d4 |
class process sigchld;
|
|
Chris PeBenito |
9a66d4 |
class fd use;
|
|
Chris PeBenito |
9a66d4 |
class fifo_file rw_file_perms;
|
|
Chris PeBenito |
9a66d4 |
')
|
|
Chris PeBenito |
9a66d4 |
|
|
Chris PeBenito |
9a66d4 |
corecmd_search_sbin($1)
|
|
Chris PeBenito |
9a66d4 |
domain_auto_trans($1,acct_exec_t,acct_t)
|
|
Chris PeBenito |
9a66d4 |
|
|
Chris PeBenito |
9a66d4 |
allow $1 acct_t:fd use;
|
|
Chris PeBenito |
9a66d4 |
allow acct_t $1:fd use;
|
|
Chris PeBenito |
9a66d4 |
allow acct_t $1:fifo_file rw_file_perms;
|
|
Chris PeBenito |
9a66d4 |
allow acct_t $1:process sigchld;
|
|
Chris PeBenito |
9a66d4 |
')
|
|
Chris PeBenito |
9a66d4 |
|
|
Chris PeBenito |
9a66d4 |
########################################
|
|
Chris PeBenito |
9a66d4 |
## <summary>
|
|
Chris PeBenito |
9a66d4 |
## Execute accounting management tools in the caller domain.
|
|
Chris PeBenito |
9a66d4 |
## </summary>
|
|
Chris PeBenito |
9a66d4 |
## <param name="domain">
|
|
Chris PeBenito |
9a66d4 |
## The type of the process performing this action.
|
|
Chris PeBenito |
9a66d4 |
## </param>
|
|
Chris PeBenito |
9a66d4 |
#
|
|
Chris PeBenito |
9a66d4 |
interface(`acct_exec',`
|
|
Chris PeBenito |
9a66d4 |
gen_require(`
|
|
Chris PeBenito |
9a66d4 |
type acct_exec_t;
|
|
Chris PeBenito |
9a66d4 |
')
|
|
Chris PeBenito |
9a66d4 |
|
|
Chris PeBenito |
9a66d4 |
corecmd_search_sbin($1)
|
|
Chris PeBenito |
9a66d4 |
can_exec($1,acct_exec_t)
|
|
Chris PeBenito |
9a66d4 |
')
|
|
Chris PeBenito |
9a66d4 |
|
|
Chris PeBenito |
9a66d4 |
########################################
|
|
Chris PeBenito |
9a66d4 |
## <summary>
|
|
Chris PeBenito |
9a66d4 |
## Execute accounting management data in the caller domain.
|
|
Chris PeBenito |
9a66d4 |
## </summary>
|
|
Chris PeBenito |
9a66d4 |
## <param name="domain">
|
|
Chris PeBenito |
9a66d4 |
## The type of the process performing this action.
|
|
Chris PeBenito |
9a66d4 |
## </param>
|
|
Chris PeBenito |
9a66d4 |
#
|
|
Chris PeBenito |
9a66d4 |
# cjp: this is added for logrotate, and does
|
|
Chris PeBenito |
9a66d4 |
# not make sense to me.
|
|
Chris PeBenito |
9a66d4 |
interface(`acct_exec_data',`
|
|
Chris PeBenito |
9a66d4 |
gen_require(`
|
|
Chris PeBenito |
9a66d4 |
type acct_data_t;
|
|
Chris PeBenito |
9a66d4 |
')
|
|
Chris PeBenito |
9a66d4 |
|
|
Chris PeBenito |
9a66d4 |
files_search_var($1)
|
|
Chris PeBenito |
9a66d4 |
can_exec($1,acct_data_t)
|
|
Chris PeBenito |
9a66d4 |
')
|
|
Chris PeBenito |
9a66d4 |
|
|
Chris PeBenito |
9a66d4 |
########################################
|
|
Chris PeBenito |
9a66d4 |
## <summary>
|
|
Chris PeBenito |
9a66d4 |
## Create, read, write, and delete process accounting data.
|
|
Chris PeBenito |
9a66d4 |
## </summary>
|
|
Chris PeBenito |
9a66d4 |
## <param name="domain">
|
|
Chris PeBenito |
9a66d4 |
## The type of the process performing this action.
|
|
Chris PeBenito |
9a66d4 |
## </param>
|
|
Chris PeBenito |
9a66d4 |
#
|
|
Chris PeBenito |
9a66d4 |
interface(`acct_manage_data',`
|
|
Chris PeBenito |
9a66d4 |
gen_require(`
|
|
Chris PeBenito |
9a66d4 |
type acct_data_t;
|
|
Chris PeBenito |
9a66d4 |
class dir rw_dir_perms;
|
|
Chris PeBenito |
9a66d4 |
class file create_file_perms;
|
|
Chris PeBenito |
9a66d4 |
class lnk_file create_lnk_perms;
|
|
Chris PeBenito |
9a66d4 |
')
|
|
Chris PeBenito |
9a66d4 |
|
|
Chris PeBenito |
9a66d4 |
files_search_var($1)
|
|
Chris PeBenito |
9a66d4 |
allow $1 acct_data_t:dir rw_dir_perms;
|
|
Chris PeBenito |
9a66d4 |
allow $1 acct_data_t:file create_file_perms;
|
|
Chris PeBenito |
9a66d4 |
allow $1 acct_data_t:lnk_file create_lnk_perms;
|
|
Chris PeBenito |
9a66d4 |
')
|