40 lines
770 B
Text
40 lines
770 B
Text
|
## <summary>policy for wireguard</summary>
|
||
|
|
||
|
########################################
|
||
|
## <summary>
|
||
|
## Execute wireguard_exec_t in the wireguard domain.
|
||
|
## </summary>
|
||
|
## <param name="domain">
|
||
|
## <summary>
|
||
|
## Domain allowed to transition.
|
||
|
## </summary>
|
||
|
## </param>
|
||
|
#
|
||
|
interface(`wireguard_domtrans',`
|
||
|
gen_require(`
|
||
|
type wireguard_t, wireguard_exec_t;
|
||
|
')
|
||
|
|
||
|
corecmd_search_bin($1)
|
||
|
domtrans_pattern($1, wireguard_exec_t, wireguard_t)
|
||
|
')
|
||
|
|
||
|
######################################
|
||
|
## <summary>
|
||
|
## Execute wireguard in the caller domain.
|
||
|
## </summary>
|
||
|
## <param name="domain">
|
||
|
## <summary>
|
||
|
## Domain allowed access.
|
||
|
## </summary>
|
||
|
## </param>
|
||
|
#
|
||
|
interface(`wireguard_exec',`
|
||
|
gen_require(`
|
||
|
type wireguard_exec_t;
|
||
|
')
|
||
|
|
||
|
corecmd_search_bin($1)
|
||
|
can_exec($1, wireguard_exec_t)
|
||
|
')
|