2018-06-23 13:00:56 +00:00
|
|
|
## <summary>Document database server.</summary>
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read couchdb log files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`couchdb_read_log_files',`
|
|
|
|
gen_require(`
|
|
|
|
type couchdb_log_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
logging_search_logs($1)
|
|
|
|
read_files_pattern($1, couchdb_log_t, couchdb_log_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read, write, and create couchdb lib files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`couchdb_manage_lib_files',`
|
|
|
|
gen_require(`
|
|
|
|
type couchdb_var_lib_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_var_lib($1)
|
|
|
|
read_files_pattern($1, couchdb_var_lib_t, couchdb_var_lib_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read couchdb config files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`couchdb_read_conf_files',`
|
|
|
|
gen_require(`
|
|
|
|
type couchdb_conf_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_etc($1)
|
|
|
|
read_files_pattern($1, couchdb_conf_t, couchdb_conf_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2020-06-27 20:49:41 +00:00
|
|
|
## Read couchdb pid files. (Deprecated)
|
2018-06-23 13:00:56 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`couchdb_read_pid_files',`
|
2020-06-27 20:49:41 +00:00
|
|
|
refpolicywarn(`$0($*) has been deprecated, please use couchdb_read_runtime_files() instead.')
|
|
|
|
couchdb_read_runtime_files($1)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read couchdb runtime files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`couchdb_read_runtime_files',`
|
2018-06-23 13:00:56 +00:00
|
|
|
gen_require(`
|
2019-09-08 20:55:02 +00:00
|
|
|
type couchdb_runtime_t;
|
2018-06-23 13:00:56 +00:00
|
|
|
')
|
|
|
|
|
2020-06-27 21:11:48 +00:00
|
|
|
files_search_runtime($1)
|
2019-09-08 20:55:02 +00:00
|
|
|
read_files_pattern($1, couchdb_runtime_t, couchdb_runtime_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## All of the rules required to
|
|
|
|
## administrate an couchdb environment.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
|
|
|
## <summary>
|
|
|
|
## Role allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`couchdb_admin',`
|
|
|
|
gen_require(`
|
|
|
|
type couchdb_t, couchdb_conf_t, couchdb_initrc_exec_t;
|
2019-09-08 20:55:02 +00:00
|
|
|
type couchdb_log_t, couchdb_var_lib_t, couchdb_runtime_t;
|
2018-06-23 13:00:56 +00:00
|
|
|
type couchdb_tmp_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 couchdb_t:process { ptrace signal_perms };
|
|
|
|
ps_process_pattern($1, couchdb_t)
|
|
|
|
|
|
|
|
init_startstop_service($1, $2, couchdb_t, couchdb_initrc_exec_t)
|
|
|
|
|
|
|
|
files_search_etc($1)
|
|
|
|
admin_pattern($1, couchdb_conf_t)
|
|
|
|
|
|
|
|
logging_search_logs($1)
|
|
|
|
admin_pattern($1, couchdb_log_t)
|
|
|
|
|
|
|
|
files_search_tmp($1)
|
|
|
|
admin_pattern($1, couchdb_tmp_t)
|
|
|
|
|
|
|
|
files_search_var_lib($1)
|
|
|
|
admin_pattern($1, couchdb_var_lib_t)
|
|
|
|
|
2020-06-27 21:11:48 +00:00
|
|
|
files_search_runtime($1)
|
2019-09-08 20:55:02 +00:00
|
|
|
admin_pattern($1, couchdb_runtime_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
')
|