2009-08-31 14:21:01 +00:00
|
|
|
## <summary>helper function for grantpt(3), changes ownship and permissions of pseudotty</summary>
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute a domain transition to run ptchown.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed to transition.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`ptchown_domtrans',`
|
|
|
|
gen_require(`
|
|
|
|
type ptchown_t, ptchown_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
domtrans_pattern($1, ptchown_exec_t, ptchown_t)
|
|
|
|
')
|
|
|
|
|
2010-03-16 12:37:41 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute ptchown in the ptchown domain, and
|
|
|
|
## allow the specified role the ptchown domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Role allowed access.
|
2010-03-16 12:37:41 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`ptchown_run',`
|
|
|
|
gen_require(`
|
|
|
|
type ptchown_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
ptchown_domtrans($1)
|
|
|
|
role $2 types ptchown_t;
|
|
|
|
')
|