Chris PeBenito 6cd6d7
## <summary>giFT peer to peer file sharing tool</summary>
Chris PeBenito 6cd6d7
Chris PeBenito 296273
############################################################
Chris PeBenito 6cd6d7
## <summary>
Chris PeBenito 296273
##	Role access for gift
Chris PeBenito 6cd6d7
## </summary>
Chris PeBenito 296273
## <param name="role">
Chris PeBenito 6cd6d7
##	<summary>
Chris PeBenito 296273
##	Role allowed access
Chris PeBenito 6cd6d7
##	</summary>
Chris PeBenito 6cd6d7
## </param>
Chris PeBenito 296273
## <param name="domain">
Chris PeBenito 6cd6d7
##	<summary>
Chris PeBenito 296273
##	User domain for the role
Chris PeBenito 6cd6d7
##	</summary>
Chris PeBenito 6cd6d7
## </param>
Chris PeBenito 6cd6d7
#
Chris PeBenito 296273
interface(`gift_role',`
Chris PeBenito 296273
	gen_require(`
Chris PeBenito 296273
		type gift_t, gift_exec_t;
Chris PeBenito 296273
		type giftd_t, giftd_exec_t;
Chris PeBenito 296273
		type gift_home_t;
Chris PeBenito 296273
	')
Chris PeBenito 6cd6d7
Chris PeBenito 296273
	role $1 types { gift_t giftd_t };
Chris PeBenito 6cd6d7
Chris PeBenito 6cd6d7
	# transition from user domain
Chris PeBenito 296273
	domtrans_pattern($2, gift_exec_t, gift_t)
Chris PeBenito 296273
	domtrans_pattern($2, giftd_exec_t, giftd_t)
Chris PeBenito 6cd6d7
Chris PeBenito 6cd6d7
	# user managed content
Chris PeBenito 296273
	manage_dirs_pattern($2, gift_home_t, gift_home_t)
Chris PeBenito 296273
	manage_files_pattern($2, gift_home_t, gift_home_t)
Chris PeBenito 296273
	manage_lnk_files_pattern($2, gift_home_t, gift_home_t)
Chris PeBenito 296273
	relabel_dirs_pattern($2, gift_home_t, gift_home_t)
Chris PeBenito 296273
	relabel_files_pattern($2, gift_home_t, gift_home_t)
Chris PeBenito 296273
	relabel_lnk_files_pattern($2, gift_home_t, gift_home_t)
Chris PeBenito 6cd6d7
Chris PeBenito 6cd6d7
	# Allow the user domain to signal/ps.
Chris PeBenito 296273
	ps_process_pattern($2, { gift_t giftd_t })
Chris PeBenito 296273
	allow $2 { gift_t giftd_t }:process signal_perms;
Chris PeBenito 6cd6d7
')