## File system quota management.
########################################
##
## Execute quota management tools in the quota domain.
##
##
##
## Domain allowed to transition.
##
##
#
interface(`quota_domtrans',`
gen_require(`
type quota_t, quota_exec_t;
')
corecmd_search_bin($1)
domtrans_pattern($1, quota_exec_t, quota_t)
')
########################################
##
## Execute quota management tools in
## the quota domain, and allow the
## specified role the quota domain.
##
##
##
## Domain allowed to transition.
##
##
##
##
## Role allowed access.
##
##
##
#
interface(`quota_run',`
gen_require(`
attribute_role quota_roles;
')
quota_domtrans($1)
roleattribute $2 quota_roles;
')
#######################################
##
## Execute quota nld in the quota nld domain.
##
##
##
## Domain allowed to transition.
##
##
#
interface(`quota_domtrans_nld',`
gen_require(`
type quota_nld_t, quota_nld_exec_t;
')
corecmd_search_bin($1)
domtrans_pattern($1, quota_nld_exec_t, quota_nld_t)
')
########################################
##
## Create, read, write, and delete
## quota db files.
##
##
##
## Domain allowed access.
##
##
#
interface(`quota_manage_db_files',`
gen_require(`
type quota_db_t;
')
allow $1 quota_db_t:file manage_file_perms;
')
########################################
##
## Create specified objects in specified
## directories with a type transition to
## the quota db file type.
##
##
##
## Domain allowed access.
##
##
##
##
## Directory to transition on.
##
##
##
##
## The object class of the object being created.
##
##
##
##
## The name of the object being created.
##
##
#
interface(`quota_spec_filetrans_db',`
gen_require(`
type quota_db_t;
')
filetrans_pattern($1, $2, quota_db_t, $3, $4)
')
########################################
##
## Do not audit attempts to get attributes
## of filesystem quota data files.
##
##
##
## Domain to not audit.
##
##
#
interface(`quota_dontaudit_getattr_db',`
gen_require(`
type quota_db_t;
')
dontaudit $1 quota_db_t:file getattr_file_perms;
')
########################################
##
## Create, read, write, and delete
## quota flag files.
##
##
##
## Domain allowed access.
##
##
#
interface(`quota_manage_flags',`
gen_require(`
type quota_flag_t;
')
files_search_var_lib($1)
manage_files_pattern($1, quota_flag_t, quota_flag_t)
')
########################################
##
## All of the rules required to
## administrate an quota environment.
##
##
##
## Domain allowed access.
##
##
##
##
## Role allowed access.
##
##
##
#
interface(`quota_admin',`
gen_require(`
type quota_nld_t, quota_t, quota_db_t;
type quota_nld_initrc_exec_t, quota_flag_t, quota_nld_var_run_t;
')
allow $1 { quota_nld_t quota_t }:process { ptrace signal_perms };
ps_process_pattern($1, { quota_nld_t quota_t })
init_startstop_service($1, $2, quota_nld_t, quota_nld_initrc_exec_t)
files_list_all($1)
admin_pattern($1, { quota_db_t quota_flag_t quota_nld_var_run_t })
')