Chris PeBenito aac56b
## <summary>helper function for grantpt(3), changes ownship and permissions of pseudotty</summary>
Chris PeBenito aac56b
Chris PeBenito aac56b
########################################
Chris PeBenito aac56b
## <summary>
Chris PeBenito aac56b
##	Execute a domain transition to run ptchown.
Chris PeBenito aac56b
## </summary>
Chris PeBenito aac56b
## <param name="domain">
Chris PeBenito aac56b
## <summary>
Chris PeBenito aac56b
##	Domain allowed to transition.
Chris PeBenito aac56b
## </summary>
Chris PeBenito aac56b
## </param>
Chris PeBenito aac56b
#
Chris PeBenito aac56b
interface(`ptchown_domtrans',`
Chris PeBenito aac56b
	gen_require(`
Chris PeBenito aac56b
		type ptchown_t, ptchown_exec_t;
Chris PeBenito aac56b
	')
Chris PeBenito aac56b
Chris PeBenito aac56b
	domtrans_pattern($1, ptchown_exec_t, ptchown_t)
Chris PeBenito aac56b
')
Chris PeBenito aac56b
Jeremy Solt 313714
########################################
Jeremy Solt 313714
## <summary>
Jeremy Solt 313714
##	Execute ptchown in the ptchown domain, and
Jeremy Solt 313714
##	allow the specified role the ptchown domain.
Jeremy Solt 313714
## </summary>
Jeremy Solt 313714
## <param name="domain">
Jeremy Solt 313714
##	<summary>
Dominick Grift 03b866
##	Domain allowed to transition.
Jeremy Solt 313714
##	</summary>
Jeremy Solt 313714
## </param>
Jeremy Solt 313714
## <param name="role">
Jeremy Solt 313714
##	<summary>
Chris PeBenito a7ee7f
##	Role allowed access.
Jeremy Solt 313714
##	</summary>
Jeremy Solt 313714
## </param>
Jeremy Solt 313714
#
Jeremy Solt 313714
interface(`ptchown_run',`
Jeremy Solt 313714
	gen_require(`
Jeremy Solt 313714
		type ptchown_t;
Jeremy Solt 313714
	')
Jeremy Solt 313714
Jeremy Solt 313714
	ptchown_domtrans($1)
Jeremy Solt 313714
	role $2 types ptchown_t;
Jeremy Solt 313714
')