2019-10-07 14:20:22 +00:00
|
|
|
## <summary>apt-cacher, cache for Debian APT repositories.</summary>
|
|
|
|
|
2019-10-11 12:34:27 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute acngtool in the acngtool domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed to transition.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`aptcacher_domtrans_acngtool',`
|
|
|
|
gen_require(`
|
|
|
|
type acngtool_t, acngtool_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
corecmd_search_bin($1)
|
|
|
|
domtrans_pattern($1, acngtool_exec_t, acngtool_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute acngtool in the acngtool domain, and
|
|
|
|
## allow the specified role the acngtool domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed to transition.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
|
|
|
## <summary>
|
|
|
|
## Role allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`aptcacher_run_acngtool',`
|
|
|
|
gen_require(`
|
|
|
|
attribute_role acngtool_roles;
|
|
|
|
')
|
|
|
|
|
|
|
|
aptcacher_domtrans_acngtool($1)
|
|
|
|
roleattribute $2 acngtool_roles;
|
|
|
|
')
|
|
|
|
|
2019-10-07 14:20:22 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Connect to aptcacher using a unix
|
|
|
|
## stream socket.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`aptcacher_stream_connect',`
|
|
|
|
gen_require(`
|
|
|
|
type aptcacher_t, aptcacher_runtime_t;
|
|
|
|
')
|
|
|
|
|
2020-06-27 21:11:48 +00:00
|
|
|
files_search_runtime($1)
|
2019-10-07 14:20:22 +00:00
|
|
|
stream_connect_pattern($1, aptcacher_runtime_t, aptcacher_runtime_t, aptcacher_t)
|
|
|
|
')
|