## <summary>Record audio or data Compact Discs from a master.</summary>

########################################
## <summary>
##	Role access for cdrecord.
## </summary>
## <param name="role">
##	<summary>
##	Role allowed access.
##	</summary>
## </param>
## <param name="domain">
##	<summary>
##	User domain for the role.
##	</summary>
## </param>
#
interface(`cdrecord_role',`
	gen_require(`
		attribute_role cdrecord_roles;
		type cdrecord_t, cdrecord_exec_t;
	')

	roleattribute $1 cdrecord_roles;

	domtrans_pattern($2, cdrecord_exec_t, cdrecord_t)

	allow cdrecord_t $2:unix_stream_socket rw_socket_perms;

	allow $2 cdrecord_t:process signal_perms;
	tunable_policy(`deny_ptrace',`',`
		allow $2 cdrecord_t:process ptrace;
	')
	ps_process_pattern($2, cdrecord_t)
')
