|
Chris PeBenito |
4bf4ed |
## <summary>
|
|
Chris PeBenito |
414e41 |
## Policy for hotplug system, for supporting the
|
|
Chris PeBenito |
414e41 |
## connection and disconnection of devices at runtime.
|
|
Chris PeBenito |
4bf4ed |
## </summary>
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
6b9383 |
#######################################
|
|
Chris PeBenito |
6b9383 |
#
|
|
Chris PeBenito |
c9428d |
# hotplug_domtrans(domain)
|
|
Chris PeBenito |
6b9383 |
#
|
|
Chris PeBenito |
199895 |
interface(`hotplug_domtrans',`
|
|
Chris PeBenito |
139520 |
gen_require(`
|
|
Chris PeBenito |
139520 |
type hotplug_t, hotplug_exec_t;
|
|
Chris PeBenito |
139520 |
class process sigchld;
|
|
Chris PeBenito |
139520 |
class fd use;
|
|
Chris PeBenito |
139520 |
class fifo_file rw_file_perms;
|
|
Chris PeBenito |
139520 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
139520 |
corecmd_search_sbin($1)
|
|
Chris PeBenito |
139520 |
domain_auto_trans($1,hotplug_exec_t,hotplug_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
allow $1 hotplug_t:fd use;
|
|
Chris PeBenito |
0c73cd |
allow hotplug_t $1:fd use;
|
|
Chris PeBenito |
0c73cd |
allow hotplug_t $1:fifo_file rw_file_perms;
|
|
Chris PeBenito |
0c73cd |
allow hotplug_t $1:process sigchld;
|
|
Chris PeBenito |
6b9383 |
')
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
6b9383 |
#######################################
|
|
Chris PeBenito |
6b9383 |
#
|
|
Chris PeBenito |
c9428d |
# hotplug_exec(domain)
|
|
Chris PeBenito |
6b9383 |
#
|
|
Chris PeBenito |
199895 |
interface(`hotplug_exec',`
|
|
Chris PeBenito |
139520 |
gen_require(`
|
|
Chris PeBenito |
139520 |
type hotplug_t;
|
|
Chris PeBenito |
139520 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
139520 |
corecmd_search_sbin($1)
|
|
Chris PeBenito |
dd8229 |
can_exec($1,hotplug_exec_t)
|
|
Chris PeBenito |
6b9383 |
')
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
6b9383 |
#######################################
|
|
Chris PeBenito |
6b9383 |
#
|
|
Chris PeBenito |
c9428d |
# hotplug_use_fd(domain)
|
|
Chris PeBenito |
6b9383 |
#
|
|
Chris PeBenito |
199895 |
interface(`hotplug_use_fd',`
|
|
Chris PeBenito |
139520 |
gen_require(`
|
|
Chris PeBenito |
139520 |
type hotplug_t;
|
|
Chris PeBenito |
139520 |
class fd use;
|
|
Chris PeBenito |
139520 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
allow $1 hotplug_t:fd use;
|
|
Chris PeBenito |
6b9383 |
')
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
13e94c |
#######################################
|
|
Chris PeBenito |
13e94c |
#
|
|
Chris PeBenito |
c9428d |
# hotplug_dontaudit_use_fd(domain)
|
|
Chris PeBenito |
13e94c |
#
|
|
Chris PeBenito |
199895 |
interface(`hotplug_dontaudit_use_fd',`
|
|
Chris PeBenito |
139520 |
gen_require(`
|
|
Chris PeBenito |
139520 |
type hotplug_t;
|
|
Chris PeBenito |
139520 |
class fd use;
|
|
Chris PeBenito |
139520 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
dontaudit $1 hotplug_t:fd use;
|
|
Chris PeBenito |
13e94c |
')
|
|
Chris PeBenito |
13e94c |
|
|
Chris PeBenito |
1e5c2a |
########################################
|
|
Chris PeBenito |
1e5c2a |
#
|
|
Chris PeBenito |
c9428d |
# hotplug_dontaudit_search_config(domain)
|
|
Chris PeBenito |
1e5c2a |
#
|
|
Chris PeBenito |
199895 |
interface(`hotplug_dontaudit_search_config',`
|
|
Chris PeBenito |
139520 |
gen_require(`
|
|
Chris PeBenito |
139520 |
type hotplug_etc_t;
|
|
Chris PeBenito |
139520 |
class dir search;
|
|
Chris PeBenito |
139520 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
dontaudit $1 hotplug_etc_t:dir search;
|
|
Chris PeBenito |
1e5c2a |
')
|
|
Chris PeBenito |
1e5c2a |
|
|
Chris PeBenito |
1e5c2a |
########################################
|
|
Chris PeBenito |
ae9e27 |
## <summary>
|
|
Chris PeBenito |
ae9e27 |
## Get the attributes of the hotplug configuration directory.
|
|
Chris PeBenito |
ae9e27 |
## </summary>
|
|
Chris PeBenito |
ae9e27 |
## <param name="domain">
|
|
Chris PeBenito |
ae9e27 |
## Domain allowed access.
|
|
Chris PeBenito |
ae9e27 |
## </param>
|
|
Chris PeBenito |
ae9e27 |
#
|
|
Chris PeBenito |
ae9e27 |
interface(`hotplug_getattr_config_dir',`
|
|
Chris PeBenito |
ae9e27 |
gen_require(`
|
|
Chris PeBenito |
ae9e27 |
type hotplug_etc_t;
|
|
Chris PeBenito |
ae9e27 |
class dir getattr;
|
|
Chris PeBenito |
ae9e27 |
')
|
|
Chris PeBenito |
ae9e27 |
|
|
Chris PeBenito |
ae9e27 |
allow $1 hotplug_etc_t:dir getattr;
|
|
Chris PeBenito |
ae9e27 |
')
|
|
Chris PeBenito |
ae9e27 |
|
|
Chris PeBenito |
ae9e27 |
########################################
|
|
Chris PeBenito |
ae9e27 |
## <summary>
|
|
Chris PeBenito |
ae9e27 |
## Search the hotplug configuration directory.
|
|
Chris PeBenito |
ae9e27 |
## </summary>
|
|
Chris PeBenito |
ae9e27 |
## <param name="domain">
|
|
Chris PeBenito |
ae9e27 |
## Domain allowed access.
|
|
Chris PeBenito |
ae9e27 |
## </param>
|
|
Chris PeBenito |
ae9e27 |
#
|
|
Chris PeBenito |
ae9e27 |
interface(`hotplug_search_config',`
|
|
Chris PeBenito |
ae9e27 |
gen_require(`
|
|
Chris PeBenito |
ae9e27 |
type hotplug_etc_t;
|
|
Chris PeBenito |
ae9e27 |
class dir search;
|
|
Chris PeBenito |
ae9e27 |
')
|
|
Chris PeBenito |
ae9e27 |
|
|
Chris PeBenito |
ae9e27 |
allow $1 hotplug_etc_t:dir search;
|
|
Chris PeBenito |
ae9e27 |
')
|
|
Chris PeBenito |
ae9e27 |
|
|
Chris PeBenito |
ae9e27 |
########################################
|
|
Chris PeBenito |
ae9e27 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## Read the configuration files for hotplug.
|
|
Chris PeBenito |
ae9e27 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
414e41 |
## The type of the process performing this action.
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
1e5c2a |
#
|
|
Chris PeBenito |
199895 |
interface(`hotplug_read_config',`
|
|
Chris PeBenito |
139520 |
gen_require(`
|
|
Chris PeBenito |
139520 |
type hotplug_etc_t;
|
|
Chris PeBenito |
139520 |
class file r_file_perms;
|
|
Chris PeBenito |
139520 |
class dir r_dir_perms;
|
|
Chris PeBenito |
139520 |
class lnk_file r_file_perms;
|
|
Chris PeBenito |
139520 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
c9428d |
files_search_etc($1)
|
|
Chris PeBenito |
dd8229 |
allow $1 hotplug_etc_t:file r_file_perms;
|
|
Chris PeBenito |
dd8229 |
allow $1 hotplug_etc_t:dir r_dir_perms;
|
|
Chris PeBenito |
dd8229 |
allow $1 hotplug_etc_t:lnk_file r_file_perms;
|
|
Chris PeBenito |
1e5c2a |
')
|
|
Chris PeBenito |
1e5c2a |
|