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