Chris PeBenito 17de1b
## <summary>User network interface configuration helper</summary>
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute usernetctl in the usernetctl domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Dominick Grift 03b866
##	Domain allowed to transition.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`usernetctl_domtrans',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type usernetctl_t, usernetctl_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
	domtrans_pattern($1, usernetctl_exec_t, usernetctl_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute usernetctl in the usernetctl domain, and
Chris PeBenito 17de1b
##	allow the specified role the usernetctl domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Dominick Grift 03b866
##	Domain allowed to transition.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="role">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito a7ee7f
##	Role allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`usernetctl_run',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type usernetctl_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	usernetctl_domtrans($1)
Chris PeBenito 17de1b
	role $2 types usernetctl_t;
Chris PeBenito 17de1b
Chris PeBenito 296273
	sysnet_run_ifconfig(usernetctl_t, $2)
Chris PeBenito 296273
	sysnet_run_dhcpc(usernetctl_t, $2)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	optional_policy(`
Chris PeBenito 296273
		consoletype_run(usernetctl_t, $2)
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	optional_policy(`
Chris PeBenito 296273
		iptables_run(usernetctl_t, $2)
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	optional_policy(`
Chris PeBenito 296273
		modutils_run_insmod(usernetctl_t, $2)
Chris PeBenito 17de1b
	')
Chris PeBenito 8a948c
Chris PeBenito 8a948c
	optional_policy(`
Chris PeBenito 296273
		ppp_run(usernetctl_t, $2)
Chris PeBenito 8a948c
	')
Chris PeBenito 17de1b
')