Chris PeBenito 6b19be
## <summary>PCSC smart card service</summary>
Chris PeBenito 6b19be
Chris PeBenito 6b19be
########################################
Chris PeBenito 6b19be
## <summary>
Chris PeBenito 6b19be
##	Execute a domain transition to run pcscd.
Chris PeBenito 6b19be
## </summary>
Chris PeBenito 6b19be
## <param name="domain">
Chris PeBenito 6b19be
## <summary>
Chris PeBenito 6b19be
##	Domain allowed to transition.
Chris PeBenito 6b19be
## </summary>
Chris PeBenito 6b19be
## </param>
Chris PeBenito 6b19be
#
Chris PeBenito 6b19be
interface(`pcscd_domtrans',`
Chris PeBenito 6b19be
	gen_require(`
Chris PeBenito 6b19be
		type pcscd_t, pcscd_exec_t;
Chris PeBenito 6b19be
	')
Chris PeBenito 6b19be
Chris PeBenito 6b19be
	domtrans_pattern($1,pcscd_exec_t,pcscd_t)
Chris PeBenito 6b19be
')
Chris PeBenito 6b19be
Chris PeBenito 6b19be
########################################
Chris PeBenito 6b19be
## <summary>
Chris PeBenito 6b19be
##	Read pcscd pub files.
Chris PeBenito 6b19be
## </summary>
Chris PeBenito 6b19be
## <param name="domain">
Chris PeBenito 6b19be
##	<summary>
Chris PeBenito 6b19be
##	Domain allowed access.
Chris PeBenito 6b19be
##	</summary>
Chris PeBenito 6b19be
## </param>
Chris PeBenito 6b19be
#
Chris PeBenito 6b19be
interface(`pcscd_read_pub_files',`
Chris PeBenito 6b19be
	gen_require(`
Chris PeBenito 6b19be
		type pcscd_var_run_t;
Chris PeBenito 6b19be
	')
Chris PeBenito 6b19be
Chris PeBenito 6b19be
	files_search_pids($1)
Chris PeBenito 6b19be
	allow $1 pcscd_var_run_t:file read_file_perms;
Chris PeBenito 6b19be
')
Chris PeBenito 6b19be
Chris PeBenito 6b19be
########################################
Chris PeBenito 6b19be
## <summary>
Chris PeBenito 6b19be
##	Connect to pcscd over an unix stream socket.
Chris PeBenito 6b19be
## </summary>
Chris PeBenito 6b19be
## <param name="domain">
Chris PeBenito 6b19be
##	<summary>
Chris PeBenito 6b19be
##	Domain allowed access.
Chris PeBenito 6b19be
##	</summary>
Chris PeBenito 6b19be
## </param>
Chris PeBenito 6b19be
#
Chris PeBenito 6b19be
interface(`pcscd_stream_connect',`
Chris PeBenito 6b19be
	gen_require(`
Chris PeBenito 6b19be
		type pcscd_t, pcscd_var_run_t;
Chris PeBenito 6b19be
	')
Chris PeBenito 6b19be
Chris PeBenito 6b19be
	files_search_pids($1)
Chris PeBenito 6b19be
	allow $1 pcscd_var_run_t:sock_file write;
Chris PeBenito 6b19be
	allow $1 pcscd_t:unix_stream_socket connectto;
Chris PeBenito 6b19be
')