## helper function for grantpt(3), changes ownship and permissions of pseudotty. ######################################## ## ## Execute a domain transition to run ptchown. ## ## ## ## Domain allowed to transition. ## ## # interface(`ptchown_domtrans',` gen_require(` type ptchown_t, ptchown_exec_t; ') corecmd_search_bin($1) domtrans_pattern($1, ptchown_exec_t, ptchown_t) ') ####################################### ## ## Execute ptchown in the caller domain. ## ## ## ## Domain allowed access. ## ## # interface(`ptchown_exec',` gen_require(` type ptchown_exec_t; ') corecmd_search_bin($1) can_exec($1, ptchown_exec_t) ') ######################################## ## ## Execute ptchown in the ptchown ## domain, and allow the specified ## role the ptchown domain. ## ## ## ## Domain allowed to transition. ## ## ## ## ## Role allowed access. ## ## # interface(`ptchown_run',` gen_require(` attribute_role ptchown_roles; ') ptchown_domtrans($1) roleattribute $2 ptchown_roles; ')