Blob Blame History Raw
## <summary>PCSC smart card service</summary>

########################################
## <summary>
##	Execute a domain transition to run pcscd.
## </summary>
## <param name="domain">
##	<summary>
##	Domain allowed to transition.
##	</summary>
## </param>
#
interface(`pcscd_domtrans',`
	gen_require(`
		type pcscd_t, pcscd_exec_t;
	')

	domtrans_pattern($1, pcscd_exec_t, pcscd_t)
')

########################################
## <summary>
##	Read pcscd pub files.
## </summary>
## <param name="domain">
##	<summary>
##	Domain allowed access.
##	</summary>
## </param>
#
interface(`pcscd_read_pub_files',`
	gen_require(`
		type pcscd_var_run_t;
	')

	files_search_pids($1)
	allow $1 pcscd_var_run_t:file read_file_perms;
')

########################################
## <summary>
##	Manage pcscd pub files.
## </summary>
## <param name="domain">
##	<summary>
##	Domain allowed access.
##	</summary>
## </param>
#
interface(`pcscd_manage_pub_files',`
	gen_require(`
		type pcscd_var_run_t;
	')

	files_search_pids($1)
	manage_files_pattern($1, pcscd_var_run_t, pcscd_var_run_t)
')

########################################
## <summary>
##	Manage pcscd pub fifo files.
## </summary>
## <param name="domain">
##	<summary>
##	Domain allowed access.
##	</summary>
## </param>
#
interface(`pcscd_manage_pub_pipes',`
	gen_require(`
		type pcscd_var_run_t;
	')

	files_search_pids($1)
	manage_fifo_files_pattern($1, pcscd_var_run_t, pcscd_var_run_t)
')

########################################
## <summary>
##	Connect to pcscd over an unix stream socket.
## </summary>
## <param name="domain">
##	<summary>
##	Domain allowed access.
##	</summary>
## </param>
#
interface(`pcscd_stream_connect',`
	gen_require(`
		type pcscd_t, pcscd_var_run_t;
	')

	files_search_pids($1)
	stream_connect_pattern($1, pcscd_var_run_t, pcscd_var_run_t, pcscd_t)
')