Chris PeBenito 44f490b
## <summary>List kernel modules of USB devices</summary>
Chris PeBenito 44f490b
Chris PeBenito 44f490b
########################################
Chris PeBenito 44f490b
## <summary>
Chris PeBenito 44f490b
##	Execute usbmodules in the usbmodules domain.
Chris PeBenito 44f490b
## </summary>
Chris PeBenito 44f490b
## <param name="domain">
Chris PeBenito 885b83e
##	<summary>
Chris PeBenito 44f490b
##	Domain allowed access.
Chris PeBenito 885b83e
##	</summary>
Chris PeBenito 44f490b
## </param>
Chris PeBenito 44f490b
#
Chris PeBenito 44f490b
interface(`usbmodules_domtrans',`
Chris PeBenito 44f490b
	gen_require(`
Chris PeBenito 44f490b
		type usbmodules_t, usbmodules_exec_t;
Chris PeBenito 44f490b
	')
Chris PeBenito 44f490b
Chris PeBenito 44f490b
	domain_auto_trans($1, usbmodules_exec_t, usbmodules_t)
Chris PeBenito 44f490b
Chris PeBenito 44f490b
	allow $1 usbmodules_t:fd use;
Chris PeBenito 44f490b
	allow usbmodules_t $1:fd use;
Chris PeBenito 44f490b
	allow usbmodules_t $1:fifo_file rw_file_perms;
Chris PeBenito 44f490b
	allow usbmodules_t $1:process sigchld;
Chris PeBenito 44f490b
Chris PeBenito 44f490b
')
Chris PeBenito 44f490b
Chris PeBenito 44f490b
########################################
Chris PeBenito 44f490b
## <summary>
Chris PeBenito 44f490b
##	Execute usbmodules in the usbmodules domain, and
Chris PeBenito 44f490b
##	allow the specified role the usbmodules domain,
Chris PeBenito 44f490b
##	and use the caller's terminal.
Chris PeBenito 44f490b
## </summary>
Chris PeBenito 44f490b
## <param name="domain">
Chris PeBenito 885b83e
##	<summary>
Chris PeBenito 44f490b
##	The type of the process performing this action.
Chris PeBenito 885b83e
##	</summary>
Chris PeBenito 44f490b
## </param>
Chris PeBenito 44f490b
## <param name="role">
Chris PeBenito 885b83e
##	<summary>
Chris PeBenito 44f490b
##	The role to be allowed the usbmodules domain.
Chris PeBenito 885b83e
##	</summary>
Chris PeBenito 44f490b
## </param>
Chris PeBenito 44f490b
## <param name="terminal">
Chris PeBenito 885b83e
##	<summary>
Chris PeBenito 44f490b
##	The type of the terminal allow the usbmodules domain to use.
Chris PeBenito 885b83e
##	</summary>
Chris PeBenito 44f490b
## </param>
Chris PeBenito bbcd3c9
## <rolecap/>
Chris PeBenito 44f490b
#
Chris PeBenito 44f490b
interface(`usbmodules_run',`
Chris PeBenito 44f490b
	gen_require(`
Chris PeBenito 44f490b
		type usbmodules_t;
Chris PeBenito 44f490b
	')
Chris PeBenito 44f490b
Chris PeBenito 44f490b
	usbmodules_domtrans($1)
Chris PeBenito 44f490b
	role $2 types usbmodules_t;
Chris PeBenito 44f490b
	allow usbmodules_t $3:chr_file rw_term_perms;
Chris PeBenito 44f490b
')