selinux-refpolicy/policy/modules/services/vnstatd.if
Russell Coker eef53e3ddc remove deprecated from 20190201
This patch removes every macro and interface that was deprecated in 20190201.

Some of them date back to 2016 or 2017.  I chose 20190201 as that is the one
that is in the previous release of Debian.  For any distribution I don't
think it makes sense to carry interfaces that were deprecated in version N
to version N+1.

One thing that particularly annoys me is when audit2allow -R gives deprecated
interfaces in it's output.  Removing some of these should reduce the
incidence of that.

I believe this is worthy of merging.

Signed-off-by: Russell Coker <russell@coker.com.au>
2021-01-25 08:59:34 -05:00

83 lines
1.6 KiB
Plaintext

## <summary>Console network traffic monitor.</summary>
########################################
## <summary>
## Execute a domain transition to run vnstat.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed to transition.
## </summary>
## </param>
#
interface(`vnstatd_domtrans_vnstat',`
gen_require(`
type vnstat_t, vnstat_exec_t;
')
corecmd_search_bin($1)
domtrans_pattern($1, vnstat_exec_t, vnstat_t)
')
########################################
## <summary>
## Execute vnstat in the vnstat domain,
## and allow the specified role
## the vnstat domain.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed to transition.
## </summary>
## </param>
## <param name="role">
## <summary>
## Role allowed access.
## </summary>
## </param>
#
interface(`vnstatd_run_vnstat',`
gen_require(`
attribute_role vnstat_roles;
')
vnstatd_domtrans_vnstat($1)
roleattribute $2 vnstat_roles;
')
########################################
## <summary>
## All of the rules required to
## administrate an vnstatd environment.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
## <param name="role">
## <summary>
## Role allowed access.
## </summary>
## </param>
## <rolecap/>
#
interface(`vnstatd_admin',`
gen_require(`
type vnstatd_t, vnstatd_initrc_exec_t;
type vnstatd_pid_t, vnstatd_unit_t, vnstatd_var_lib_t;
')
admin_process_pattern($1, vnstatd_t)
init_startstop_service($1, $2, vnstatd_t, vnstatd_initrc_exec_t, vnstatd_unit_t)
files_search_runtime($1)
admin_pattern($1, vnstatd_pid_t)
files_list_var_lib($1)
admin_pattern($1, vnstatd_var_lib_t)
vnstatd_run_vnstat($1, $2)
')