## policy for vnstatd
########################################
##
## Execute a domain transition to run vnstatd.
##
##
##
## Domain allowed access.
##
##
#
interface(`vnstatd_domtrans',`
gen_require(`
type vnstatd_t, vnstatd_exec_t;
')
domtrans_pattern($1, vnstatd_exec_t, vnstatd_t)
')
########################################
##
## Execute a domain transition to run vnstat.
##
##
##
## Domain allowed access.
##
##
#
interface(`vnstatd_domtrans_vnstat',`
gen_require(`
type vnstat_t, vnstat_exec_t;
')
domtrans_pattern($1, vnstat_exec_t, vnstat_t)
')
########################################
##
## Search vnstatd lib directories.
##
##
##
## Domain allowed access.
##
##
#
interface(`vnstatd_search_lib',`
gen_require(`
type vnstatd_var_lib_t;
')
allow $1 vnstatd_var_lib_t:dir search_dir_perms;
files_search_var_lib($1)
')
########################################
##
## Read vnstatd lib files.
##
##
##
## Domain allowed access.
##
##
#
interface(`vnstatd_read_lib_files',`
gen_require(`
type vnstatd_var_lib_t;
')
files_search_var_lib($1)
read_files_pattern($1, vnstatd_var_lib_t, vnstatd_var_lib_t)
')
########################################
##
## Create, read, write, and delete
## vnstatd lib files.
##
##
##
## Domain allowed access.
##
##
#
interface(`vnstatd_manage_lib_files',`
gen_require(`
type vnstatd_var_lib_t;
')
files_search_var_lib($1)
manage_files_pattern($1, vnstatd_var_lib_t, vnstatd_var_lib_t)
')
########################################
##
## Manage vnstatd lib dirs files.
##
##
##
## Domain allowed access.
##
##
#
interface(`vnstatd_manage_lib_dirs',`
gen_require(`
type vnstatd_var_lib_t;
')
files_search_var_lib($1)
manage_dirs_pattern($1, vnstatd_var_lib_t, vnstatd_var_lib_t)
')
########################################
##
## All of the rules required to administrate
## an vnstatd environment
##
##
##
## Domain allowed access.
##
##
##
##
## Role allowed access.
##
##
##
#
interface(`vnstatd_admin',`
gen_require(`
type vnstatd_t;
type vnstatd_var_lib_t;
')
allow $1 vnstatd_t:process { ptrace signal_perms };
ps_process_pattern($1, vnstatd_t)
files_search_var_lib($1)
admin_pattern($1, vnstatd_var_lib_t)
')