|
Chris PeBenito |
17de1b |
## <summary>Policy for udev.</summary>
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
837163 |
## Send generic signals to udev.
|
|
Chris PeBenito |
837163 |
## </summary>
|
|
Chris PeBenito |
837163 |
## <param name="domain">
|
|
Chris PeBenito |
837163 |
## <summary>
|
|
Chris PeBenito |
837163 |
## Domain allowed access.
|
|
Chris PeBenito |
837163 |
## </summary>
|
|
Chris PeBenito |
837163 |
## </param>
|
|
Chris PeBenito |
837163 |
#
|
|
Chris PeBenito |
837163 |
interface(`udev_signal',`
|
|
Chris PeBenito |
837163 |
gen_require(`
|
|
Chris PeBenito |
837163 |
type udev_t;
|
|
Chris PeBenito |
837163 |
')
|
|
Chris PeBenito |
837163 |
|
|
Chris PeBenito |
837163 |
allow $1 udev_t:process signal;
|
|
Chris PeBenito |
837163 |
')
|
|
Chris PeBenito |
837163 |
|
|
Chris PeBenito |
837163 |
########################################
|
|
Chris PeBenito |
837163 |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Execute udev in the udev domain.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## The type of the process performing this action.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`udev_domtrans',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type udev_t, udev_exec_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
c0868a |
domtrans_pattern($1, udev_exec_t, udev_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
153fe2 |
## Execute udev in the caller domain.
|
|
Chris PeBenito |
153fe2 |
## </summary>
|
|
Chris PeBenito |
153fe2 |
## <param name="domain">
|
|
Chris PeBenito |
153fe2 |
## <summary>
|
|
Chris PeBenito |
153fe2 |
## Domain allowed access.
|
|
Chris PeBenito |
153fe2 |
## </summary>
|
|
Chris PeBenito |
153fe2 |
## </param>
|
|
Chris PeBenito |
153fe2 |
#
|
|
Chris PeBenito |
153fe2 |
interface(`udev_exec',`
|
|
Chris PeBenito |
153fe2 |
gen_require(`
|
|
Chris PeBenito |
153fe2 |
type udev_exec_t;
|
|
Chris PeBenito |
153fe2 |
')
|
|
Chris PeBenito |
153fe2 |
|
|
Chris PeBenito |
153fe2 |
can_exec($1, udev_exec_t)
|
|
Chris PeBenito |
153fe2 |
')
|
|
Chris PeBenito |
153fe2 |
|
|
Chris PeBenito |
153fe2 |
########################################
|
|
Chris PeBenito |
153fe2 |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Execute a udev helper in the udev domain.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## The type of the process performing this action.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`udev_helper_domtrans',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type udev_t, udev_helper_exec_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
c0868a |
domtrans_pattern($1, udev_helper_exec_t, udev_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Allow process to read udev process state.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`udev_read_state',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type udev_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
kernel_search_proc($1)
|
|
Chris PeBenito |
c0868a |
allow $1 udev_t:file read_file_perms;
|
|
Chris PeBenito |
c0868a |
allow $1 udev_t:lnk_file read_lnk_file_perms;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Do not audit attempts to inherit a
|
|
Chris PeBenito |
17de1b |
## udev file descriptor.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain to not audit.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`udev_dontaudit_use_fds',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type udev_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
dontaudit $1 udev_t:fd use;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Do not audit attempts to read or write
|
|
Chris PeBenito |
17de1b |
## to a udev unix datagram socket.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain to not audit.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`udev_dontaudit_rw_dgram_sockets',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type udev_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
dontaudit $1 udev_t:unix_dgram_socket { read write };
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
3c9b2e |
## Do not audit search of udev database directories.
|
|
Chris PeBenito |
3c9b2e |
## </summary>
|
|
Chris PeBenito |
3c9b2e |
## <param name="domain">
|
|
Chris PeBenito |
3c9b2e |
## <summary>
|
|
Chris PeBenito |
3c9b2e |
## Domain to not audit.
|
|
Chris PeBenito |
3c9b2e |
## </summary>
|
|
Chris PeBenito |
3c9b2e |
## </param>
|
|
Chris PeBenito |
3c9b2e |
#
|
|
Chris PeBenito |
3c9b2e |
interface(`udev_dontaudit_search_db',`
|
|
Chris PeBenito |
3c9b2e |
gen_require(`
|
|
Chris PeBenito |
3c9b2e |
type udev_tbl_t;
|
|
Chris PeBenito |
3c9b2e |
')
|
|
Chris PeBenito |
3c9b2e |
|
|
Chris PeBenito |
3c9b2e |
dontaudit $1 udev_tbl_t:dir search_dir_perms;
|
|
Chris PeBenito |
3c9b2e |
')
|
|
Chris PeBenito |
3c9b2e |
|
|
Chris PeBenito |
3c9b2e |
########################################
|
|
Chris PeBenito |
3c9b2e |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Allow process to read list of devices.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## The type of the process performing this action.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`udev_read_db',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
3c9b2e |
type udev_tbl_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
dev_list_all_dev_nodes($1)
|
|
Chris PeBenito |
3c9b2e |
allow $1 udev_tbl_t:dir list_dir_perms;
|
|
Chris PeBenito |
3c9b2e |
read_files_pattern($1, udev_tbl_t, udev_tbl_t)
|
|
Chris PeBenito |
3c9b2e |
read_lnk_files_pattern($1, udev_tbl_t, udev_tbl_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Allow process to modify list of devices.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## The type of the process performing this action.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`udev_rw_db',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
3c9b2e |
type udev_tbl_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
dev_list_all_dev_nodes($1)
|
|
Chris PeBenito |
3c9b2e |
allow $1 udev_tbl_t:file rw_file_perms;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
837163 |
|
|
Chris PeBenito |
837163 |
########################################
|
|
Chris PeBenito |
837163 |
## <summary>
|
|
Chris PeBenito |
837163 |
## Create, read, write, and delete
|
|
Chris PeBenito |
837163 |
## udev pid files.
|
|
Chris PeBenito |
837163 |
## </summary>
|
|
Chris PeBenito |
837163 |
## <param name="domain">
|
|
Chris PeBenito |
837163 |
## <summary>
|
|
Chris PeBenito |
837163 |
## Domain allowed access.
|
|
Chris PeBenito |
837163 |
## </summary>
|
|
Chris PeBenito |
837163 |
## </param>
|
|
Chris PeBenito |
837163 |
#
|
|
Chris PeBenito |
837163 |
interface(`udev_manage_pid_files',`
|
|
Chris PeBenito |
837163 |
gen_require(`
|
|
Chris PeBenito |
837163 |
type udev_var_run_t;
|
|
Chris PeBenito |
837163 |
')
|
|
Chris PeBenito |
837163 |
|
|
Chris PeBenito |
837163 |
files_search_var_lib($1)
|
|
Chris PeBenito |
837163 |
manage_files_pattern($1, udev_var_run_t, udev_var_run_t)
|
|
Chris PeBenito |
837163 |
')
|