|
Dan Walsh |
3eaa99 |
## <summary>policy for boinc</summary>
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Execute a domain transition to run boinc.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dominick Grift |
c5eae5 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Domain allowed to transition.
|
|
Dominick Grift |
c5eae5 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`boinc_domtrans',`
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dan Walsh |
3eaa99 |
type boinc_t, boinc_exec_t;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
domtrans_pattern($1, boinc_exec_t, boinc_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
#######################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dominick Grift |
c5eae5 |
## Execute boinc server in the boinc domain.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dominick Grift |
c5eae5 |
## <summary>
|
|
Dominick Grift |
c5eae5 |
## Domain allowed access.
|
|
Dominick Grift |
c5eae5 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`boinc_initrc_domtrans',`
|
|
Dominick Grift |
c5eae5 |
gen_require(`
|
|
Dominick Grift |
c5eae5 |
type boinc_initrc_exec_t;
|
|
Dominick Grift |
c5eae5 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dominick Grift |
c5eae5 |
init_labeled_script_domtrans($1, boinc_initrc_exec_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Search boinc lib directories.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Domain allowed access.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`boinc_search_lib',`
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dan Walsh |
3eaa99 |
type boinc_var_lib_t;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
allow $1 boinc_var_lib_t:dir search_dir_perms;
|
|
Dan Walsh |
3eaa99 |
files_search_var_lib($1)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Read boinc lib files.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Domain allowed access.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`boinc_read_lib_files',`
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dan Walsh |
3eaa99 |
type boinc_var_lib_t;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
files_search_var_lib($1)
|
|
Dominick Grift |
c5eae5 |
read_files_pattern($1, boinc_var_lib_t, boinc_var_lib_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Create, read, write, and delete
|
|
Dan Walsh |
3eaa99 |
## boinc lib files.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Domain allowed access.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`boinc_manage_lib_files',`
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dan Walsh |
3eaa99 |
type boinc_var_lib_t;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
files_search_var_lib($1)
|
|
Dominick Grift |
c5eae5 |
manage_files_pattern($1, boinc_var_lib_t, boinc_var_lib_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Manage boinc var_lib files.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Domain allowed access.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`boinc_manage_var_lib',`
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dan Walsh |
3eaa99 |
type boinc_var_lib_t;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dominick Grift |
1e9280 |
files_search_var_lib($1)
|
|
Dominick Grift |
c5eae5 |
manage_dirs_pattern($1, boinc_var_lib_t, boinc_var_lib_t)
|
|
Dominick Grift |
c5eae5 |
manage_files_pattern($1, boinc_var_lib_t, boinc_var_lib_t)
|
|
Dominick Grift |
c5eae5 |
manage_lnk_files_pattern($1, boinc_var_lib_t, boinc_var_lib_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## All of the rules required to administrate
|
|
Dan Walsh |
3eaa99 |
## an boinc environment.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Domain allowed access.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
## <param name="role">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Role allowed access.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
## <rolecap/>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`boinc_admin',`
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dominick Grift |
6bb4d4 |
type boinc_t, boinc_initrc_exec_t, boinc_var_lib_t;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dominick Grift |
39e118 |
allow $1 boinc_t:process { ptrace signal_perms };
|
|
Dominick Grift |
39e118 |
ps_process_pattern($1, boinc_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
boinc_initrc_domtrans($1)
|
|
Dan Walsh |
3eaa99 |
domain_system_change_exemption($1)
|
|
Dan Walsh |
3eaa99 |
role_transition $2 boinc_initrc_exec_t system_r;
|
|
Dan Walsh |
3eaa99 |
allow $2 system_r;
|
|
Dominick Grift |
c5eae5 |
|
|
Dan Walsh |
3eaa99 |
files_list_var_lib($1)
|
|
Dan Walsh |
3eaa99 |
admin_pattern($1, boinc_var_lib_t)
|
|
Dan Walsh |
3eaa99 |
')
|