2005-06-13 19:22:00 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Device nodes and interfaces for many basic system devices.
|
2005-06-13 19:22:00 +00:00
|
|
|
## </summary>
|
2005-06-23 16:00:05 +00:00
|
|
|
## <desc>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <p>
|
|
|
|
## This module creates the device node concept and provides
|
|
|
|
## the policy for many of the device files. Notable exceptions are
|
|
|
|
## the mass storage and terminal devices that are covered by other
|
|
|
|
## modules.
|
|
|
|
## </p>
|
|
|
|
## <p>
|
|
|
|
## This module creates the concept of a device node. That is a
|
|
|
|
## char or block device file, usually in /dev. All types that
|
|
|
|
## are used to label device nodes should use the dev_node macro.
|
|
|
|
## </p>
|
|
|
|
## <p>
|
|
|
|
## Additionally, this module controls access to three things:
|
|
|
|
## <ul>
|
|
|
|
## <li>the device directories containing device nodes</li>
|
|
|
|
## <li>device nodes as a group</li>
|
|
|
|
## <li>individual access to specific device nodes covered by
|
|
|
|
## this module.</li>
|
|
|
|
## </ul>
|
|
|
|
## </p>
|
2005-06-23 16:00:05 +00:00
|
|
|
## </desc>
|
2005-08-18 21:27:20 +00:00
|
|
|
## <required val="true">
|
|
|
|
## Depended on by other required modules.
|
|
|
|
## </required>
|
2005-06-13 16:22:32 +00:00
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Make the passed in type a type appropriate for
|
|
|
|
## use on device nodes (usually files in /dev).
|
|
|
|
## </summary>
|
|
|
|
## <param name="object_type">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The object type that will be used on device nodes.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`dev_node',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute device_node;
|
|
|
|
')
|
2005-06-02 20:26:48 +00:00
|
|
|
|
|
|
|
typeattribute $1 device_node;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-04-28 18:59:01 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Allow full relabeling (to and from) of all device nodes.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed to relabel.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-04-28 18:59:01 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`dev_relabel_all_dev_nodes',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute device_node;
|
|
|
|
type device_t;
|
|
|
|
')
|
2005-06-02 20:26:48 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
relabelfrom_dirs_pattern($1, device_t, device_node)
|
|
|
|
relabelfrom_files_pattern($1, device_t, device_node)
|
2009-03-05 15:36:41 +00:00
|
|
|
relabelfrom_lnk_files_pattern($1, device_t, { device_t device_node })
|
2008-07-23 21:38:39 +00:00
|
|
|
relabelfrom_fifo_files_pattern($1, device_t, device_node)
|
|
|
|
relabelfrom_sock_files_pattern($1, device_t, device_node)
|
2009-11-19 14:44:19 +00:00
|
|
|
relabel_blk_files_pattern($1, device_t, { device_t device_node })
|
|
|
|
relabel_chr_files_pattern($1, device_t, { device_t device_node })
|
2005-04-28 18:59:01 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## List all of the device nodes in a device directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed to list device nodes.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`dev_list_all_dev_nodes',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
2005-06-02 20:26:48 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
list_dirs_pattern($1, device_t, device_t)
|
|
|
|
read_lnk_files_pattern($1, device_t, device_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-07-08 20:44:57 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Set the attributes of /dev directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-08 20:44:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-08 20:44:57 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_setattr_generic_dirs',`
|
2005-07-08 20:44:57 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
setattr_dirs_pattern($1, device_t, device_t)
|
2005-07-08 20:44:57 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Dontaudit attempts to list all device nodes.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain to dontaudit listing of device nodes.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`dev_dontaudit_list_all_dev_nodes',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
2005-06-02 20:26:48 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
dontaudit $1 device_t:dir list_dir_perms;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Add entries to directories in /dev.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed to add entries.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_add_entry_generic_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 device_t:dir add_entry_dir_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2009-12-18 15:33:50 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Add entries to directories in /dev.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed to add entries.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_remove_entry_generic_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 device_t:dir del_entry_dir_perms;
|
|
|
|
')
|
|
|
|
|
2005-06-01 13:51:54 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Create a directory in the device directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed to create the directory.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-01 13:51:54 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_create_generic_dirs',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
2005-06-02 20:26:48 +00:00
|
|
|
|
2007-10-29 18:35:32 +00:00
|
|
|
allow $1 device_t:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
create_dirs_pattern($1, device_t, device_t)
|
2005-06-01 13:51:54 +00:00
|
|
|
')
|
|
|
|
|
2006-09-19 17:02:29 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Delete a directory in the device directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed to create the directory.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_delete_generic_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
delete_dirs_pattern($1, device_t, device_t)
|
2006-09-19 17:02:29 +00:00
|
|
|
')
|
|
|
|
|
2009-03-05 15:36:41 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Manage of directories in /dev.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed to relabel.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_manage_generic_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
manage_dirs_pattern($1, device_t, device_t)
|
|
|
|
')
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Allow full relabeling (to and from) of directories in /dev.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed to relabel.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-13 17:35:46 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_relabel_generic_dev_dirs',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
2005-06-13 17:35:46 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
relabel_dirs_pattern($1, device_t, device_t)
|
2005-06-13 17:35:46 +00:00
|
|
|
')
|
|
|
|
|
2006-11-28 15:57:22 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## dontaudit getattr generic files in /dev.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_dontaudit_getattr_generic_files',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 device_t:file getattr;
|
|
|
|
')
|
|
|
|
|
2005-07-11 19:02:50 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write generic files in /dev.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-11 19:02:50 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-11 19:02:50 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_rw_generic_files',`
|
2005-07-11 19:02:50 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_files_pattern($1, device_t, device_t)
|
2005-07-11 19:02:50 +00:00
|
|
|
')
|
|
|
|
|
2005-09-15 21:03:29 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Delete generic files in /dev.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-15 21:03:29 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-15 21:03:29 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_delete_generic_files',`
|
2005-09-15 21:03:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
delete_files_pattern($1, device_t, device_t)
|
2005-09-15 21:03:29 +00:00
|
|
|
')
|
|
|
|
|
2005-06-10 01:01:13 +00:00
|
|
|
########################################
|
2006-02-20 16:31:54 +00:00
|
|
|
## <summary>
|
|
|
|
## Create a file in the device directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed to create the files.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_manage_generic_files',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern($1, device_t, device_t)
|
2006-02-20 16:31:54 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Dontaudit getattr on generic pipes.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain to dontaudit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-10 01:01:13 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_dontaudit_getattr_generic_pipes',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
2005-06-02 20:26:48 +00:00
|
|
|
|
|
|
|
dontaudit $1 device_t:fifo_file getattr;
|
2005-05-30 21:17:20 +00:00
|
|
|
')
|
|
|
|
|
2005-05-18 13:19:51 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Allow getattr on generic block devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-18 13:19:51 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_getattr_generic_blk_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
2005-06-02 20:26:48 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_blk_files_pattern($1, device_t, device_t)
|
2005-05-18 13:19:51 +00:00
|
|
|
')
|
|
|
|
|
2005-05-13 14:37:13 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Dontaudit getattr on generic block devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain to dontaudit access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-13 14:37:13 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_dontaudit_getattr_generic_blk_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
2005-06-02 20:26:48 +00:00
|
|
|
|
|
|
|
dontaudit $1 device_t:blk_file getattr;
|
2005-05-13 14:37:13 +00:00
|
|
|
')
|
|
|
|
|
2005-06-20 17:41:29 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Dontaudit setattr on generic block devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain to dontaudit access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-20 17:41:29 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_dontaudit_setattr_generic_blk_files',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 device_t:blk_file setattr;
|
|
|
|
')
|
|
|
|
|
2005-05-30 21:17:20 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Allow read, write, and create for generic character device files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-30 21:17:20 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_create_generic_chr_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
2005-06-02 20:26:48 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
create_chr_files_pattern($1, device_t, device_t)
|
2005-05-30 21:17:20 +00:00
|
|
|
')
|
|
|
|
|
2005-05-18 13:19:51 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Allow getattr for generic character device files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-18 13:19:51 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_getattr_generic_chr_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
2005-06-02 20:26:48 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_chr_files_pattern($1, device_t, device_t)
|
2005-05-18 13:19:51 +00:00
|
|
|
')
|
|
|
|
|
2005-05-13 14:37:13 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Dontaudit getattr for generic character device files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain to dontaudit access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-13 14:37:13 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_dontaudit_getattr_generic_chr_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
2005-06-02 20:26:48 +00:00
|
|
|
|
|
|
|
dontaudit $1 device_t:chr_file getattr;
|
2005-05-13 14:37:13 +00:00
|
|
|
')
|
|
|
|
|
2005-06-20 17:41:29 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Dontaudit setattr for generic character device files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain to dontaudit access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-20 17:41:29 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_dontaudit_setattr_generic_chr_files',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 device_t:chr_file setattr;
|
|
|
|
')
|
|
|
|
|
2005-07-11 19:02:50 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to set the attributes
|
|
|
|
## of symbolic links in device directories (/dev).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-11 19:02:50 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-11 19:02:50 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_dontaudit_setattr_generic_symlinks',`
|
2005-07-11 19:02:50 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 device_t:lnk_file setattr;
|
|
|
|
')
|
|
|
|
|
2006-09-06 22:07:25 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create symbolic links in device directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_create_generic_symlinks',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
create_lnk_files_pattern($1, device_t, device_t)
|
2006-09-06 22:07:25 +00:00
|
|
|
')
|
|
|
|
|
2005-05-24 15:55:57 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Delete symbolic links in device directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-24 15:55:57 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_delete_generic_symlinks',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
2005-06-02 20:26:48 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
delete_lnk_files_pattern($1, device_t, device_t)
|
2005-05-24 15:55:57 +00:00
|
|
|
')
|
|
|
|
|
2005-05-13 14:37:13 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Create, delete, read, and write symbolic links in device directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-13 14:37:13 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`dev_manage_generic_symlinks',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
2005-06-02 20:26:48 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_lnk_files_pattern($1, device_t, device_t)
|
2005-05-13 14:37:13 +00:00
|
|
|
')
|
|
|
|
|
2005-06-28 17:32:57 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Relabel symbolic links in device directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-28 17:32:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-28 17:32:57 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_relabel_generic_symlinks',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
relabel_lnk_files_pattern($1, device_t, device_t)
|
2005-06-28 17:32:57 +00:00
|
|
|
')
|
|
|
|
|
2005-05-02 21:02:14 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Create, delete, read, and write device nodes in device directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-02 21:02:14 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_manage_all_dev_nodes',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute device_node, memory_raw_read, memory_raw_write;
|
|
|
|
type device_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_dirs_pattern($1, device_t, device_t)
|
|
|
|
manage_sock_files_pattern($1, device_t, device_t)
|
|
|
|
manage_lnk_files_pattern($1, device_t, device_t)
|
|
|
|
manage_chr_files_pattern($1, device_t, { device_t device_node })
|
|
|
|
manage_blk_files_pattern($1, device_t, { device_t device_node })
|
|
|
|
relabel_dirs_pattern($1, device_t, device_t)
|
|
|
|
relabel_chr_files_pattern($1, device_t, { device_t device_node })
|
|
|
|
relabel_blk_files_pattern($1, device_t, { device_t device_node })
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
# these next rules are to satisfy assertions broken by the above lines.
|
|
|
|
# the permissions hopefully can be cut back a lot
|
|
|
|
storage_raw_read_fixed_disk($1)
|
|
|
|
storage_raw_write_fixed_disk($1)
|
|
|
|
storage_read_scsi_generic($1)
|
|
|
|
storage_write_scsi_generic($1)
|
|
|
|
|
|
|
|
typeattribute $1 memory_raw_read;
|
|
|
|
typeattribute $1 memory_raw_write;
|
2005-05-02 21:02:14 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Dontaudit getattr for generic device files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain to dontaudit access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`dev_dontaudit_rw_generic_dev_nodes',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
dontaudit $1 device_t:{ chr_file blk_file } { getattr read write ioctl };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-27 21:56:01 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Create, delete, read, and write block device files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-27 21:56:01 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_manage_generic_blk_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_blk_files_pattern($1, device_t, device_t)
|
2005-05-27 21:56:01 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Create, delete, read, and write character device files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-27 21:56:01 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_manage_generic_chr_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_chr_files_pattern($1, device_t, device_t)
|
2005-05-27 21:56:01 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Create, read, and write device nodes. The node
|
|
|
|
## will be transitioned to the type provided.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="file">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Type to which the created node will be transitioned.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="objectclass(es)">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Object class(es) (single or set including {}) for which this
|
|
|
|
## the transition will occur.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2006-02-21 18:40:44 +00:00
|
|
|
interface(`dev_filetrans',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
filetrans_pattern($1, device_t, $2, $3)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-11-01 15:45:00 +00:00
|
|
|
fs_associate_tmpfs($2)
|
|
|
|
files_associate_tmp($2)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-04-22 19:31:32 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Getattr on all block file device nodes.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-04-22 19:31:32 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`dev_getattr_all_blk_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute device_node;
|
2006-12-12 20:08:08 +00:00
|
|
|
type device_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_blk_files_pattern($1, device_t, device_node)
|
2005-04-22 19:31:32 +00:00
|
|
|
')
|
|
|
|
|
2005-05-13 14:37:13 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Dontaudit getattr on all block file device nodes.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain to dontaudit access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-13 14:37:13 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`dev_dontaudit_getattr_all_blk_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute device_node;
|
2009-03-05 15:36:41 +00:00
|
|
|
type device_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2009-03-05 15:36:41 +00:00
|
|
|
dontaudit $1 { device_t device_node }:blk_file getattr;
|
2005-05-13 14:37:13 +00:00
|
|
|
')
|
|
|
|
|
2005-04-22 19:31:32 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Getattr on all character file device nodes.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-04-22 19:31:32 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`dev_getattr_all_chr_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute device_node;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_chr_files_pattern($1, device_t, device_node)
|
2005-04-22 19:31:32 +00:00
|
|
|
')
|
|
|
|
|
2005-05-13 14:37:13 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Dontaudit getattr on all character file device nodes.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain to dontaudit access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-13 14:37:13 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`dev_dontaudit_getattr_all_chr_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute device_node;
|
2009-03-05 15:36:41 +00:00
|
|
|
type device_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2009-03-05 15:36:41 +00:00
|
|
|
dontaudit $1 { device_t device_node }:chr_file getattr;
|
2005-05-13 14:37:13 +00:00
|
|
|
')
|
|
|
|
|
2005-04-22 19:31:32 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Setattr on all block file device nodes.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-04-22 19:31:32 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`dev_setattr_all_blk_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute device_node;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
setattr_blk_files_pattern($1, device_t, device_node)
|
2005-04-22 19:31:32 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Setattr on all character file device nodes.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-04-22 19:31:32 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`dev_setattr_all_chr_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute device_node;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
setattr_chr_files_pattern($1, device_t, device_node)
|
2005-04-22 19:31:32 +00:00
|
|
|
')
|
|
|
|
|
2005-09-16 21:20:37 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Dontaudit read on all block file device nodes.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-16 21:20:37 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-16 21:20:37 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_dontaudit_read_all_blk_files',`
|
|
|
|
gen_require(`
|
|
|
|
attribute device_node;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 device_node:blk_file { getattr read };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Dontaudit read on all character file device nodes.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-16 21:20:37 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-16 21:20:37 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_dontaudit_read_all_chr_files',`
|
|
|
|
gen_require(`
|
|
|
|
attribute device_node;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 device_node:chr_file { getattr read };
|
|
|
|
')
|
|
|
|
|
2006-09-06 22:07:25 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create all block device files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_create_all_blk_files',`
|
|
|
|
gen_require(`
|
|
|
|
attribute device_node;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
create_blk_files_pattern($1, device_t, device_node)
|
2006-09-06 22:07:25 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create all character device files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_create_all_chr_files',`
|
|
|
|
gen_require(`
|
|
|
|
attribute device_node;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
create_chr_files_pattern($1, device_t, device_node)
|
2006-09-06 22:07:25 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Delete all block device files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_delete_all_blk_files',`
|
|
|
|
gen_require(`
|
|
|
|
attribute device_node;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
delete_blk_files_pattern($1, device_t, device_node)
|
2006-09-06 22:07:25 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Delete all character device files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_delete_all_chr_files',`
|
|
|
|
gen_require(`
|
|
|
|
attribute device_node;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
delete_chr_files_pattern($1, device_t, device_node)
|
2006-09-06 22:07:25 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Rename all block device files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_rename_all_blk_files',`
|
|
|
|
gen_require(`
|
|
|
|
attribute device_node;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
rename_blk_files_pattern($1, device_t, device_node)
|
2006-09-06 22:07:25 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Rename all character device files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_rename_all_chr_files',`
|
|
|
|
gen_require(`
|
|
|
|
attribute device_node;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
rename_chr_files_pattern($1, device_t, device_node)
|
2006-09-06 22:07:25 +00:00
|
|
|
')
|
|
|
|
|
2005-05-27 21:56:01 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Read, write, create, and delete all block device files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-27 21:56:01 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`dev_manage_all_blk_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute device_node;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_blk_files_pattern($1, device_t, device_node)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
# these next rules are to satisfy assertions broken by the above lines.
|
|
|
|
storage_raw_read_fixed_disk($1)
|
|
|
|
storage_raw_write_fixed_disk($1)
|
|
|
|
storage_read_scsi_generic($1)
|
|
|
|
storage_write_scsi_generic($1)
|
2005-05-27 21:56:01 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Read, write, create, and delete all character device files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-27 21:56:01 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`dev_manage_all_chr_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute device_node, memory_raw_read, memory_raw_write;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_chr_files_pattern($1, device_t, device_node)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
typeattribute $1 memory_raw_read, memory_raw_write;
|
2005-05-27 21:56:01 +00:00
|
|
|
')
|
|
|
|
|
2006-01-19 21:04:33 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Getattr the agp devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-19 21:04:33 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-19 21:04:33 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_getattr_agp_dev',`
|
|
|
|
gen_require(`
|
2006-01-26 18:04:57 +00:00
|
|
|
type device_t, agp_device_t;
|
2006-01-19 21:04:33 +00:00
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_chr_files_pattern($1, device_t, agp_device_t)
|
2006-01-19 21:04:33 +00:00
|
|
|
')
|
|
|
|
|
2005-07-15 14:30:19 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write the agp devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_rw_agp',`
|
2005-07-15 14:30:19 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t, agp_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_chr_files_pattern($1, device_t, agp_device_t)
|
2005-07-15 14:30:19 +00:00
|
|
|
')
|
|
|
|
|
2005-06-30 18:54:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of the apm bios device node.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-30 18:54:08 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-30 18:54:08 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_getattr_apm_bios_dev',`
|
2005-06-30 18:54:08 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t, apm_bios_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_chr_files_pattern($1, device_t, apm_bios_t)
|
2005-06-30 18:54:08 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to get the attributes of
|
|
|
|
## the apm bios device node.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-30 18:54:08 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-30 18:54:08 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_dontaudit_getattr_apm_bios_dev',`
|
2005-06-30 18:54:08 +00:00
|
|
|
gen_require(`
|
|
|
|
type apm_bios_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 apm_bios_t:chr_file getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Set the attributes of the apm bios device node.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-30 18:54:08 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-30 18:54:08 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_setattr_apm_bios_dev',`
|
2005-06-30 18:54:08 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t, apm_bios_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
setattr_chr_files_pattern($1, device_t, apm_bios_t)
|
2005-06-30 18:54:08 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to set the attributes of
|
|
|
|
## the apm bios device node.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-30 18:54:08 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-30 18:54:08 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_dontaudit_setattr_apm_bios_dev',`
|
2005-06-30 18:54:08 +00:00
|
|
|
gen_require(`
|
|
|
|
type apm_bios_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 apm_bios_t:chr_file setattr;
|
|
|
|
')
|
|
|
|
|
2005-06-29 20:53:53 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write the apm bios.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-29 20:53:53 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-29 20:53:53 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_rw_apm_bios',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, apm_bios_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_chr_files_pattern($1, device_t, apm_bios_t)
|
2005-06-29 20:53:53 +00:00
|
|
|
')
|
|
|
|
|
2009-03-05 15:36:41 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of the autofs device node.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_getattr_autofs_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, autofs_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
getattr_chr_files_pattern($1, device_t, autofs_device_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to get the attributes of
|
|
|
|
## the autofs device node.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_dontaudit_getattr_autofs_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type autofs_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 autofs_device_t:chr_file getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Set the attributes of the autofs device node.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_setattr_autofs_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, autofs_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
setattr_chr_files_pattern($1, device_t, autofs_device_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to set the attributes of
|
|
|
|
## the autofs device node.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_dontaudit_setattr_autofs_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type autofs_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 autofs_device_t:chr_file setattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write the autofs device.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_rw_autofs',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, autofs_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
rw_chr_files_pattern($1, device_t, autofs_device_t)
|
|
|
|
')
|
|
|
|
|
2005-11-08 22:00:30 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write the PCMCIA card manager device.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_rw_cardmgr',`
|
|
|
|
gen_require(`
|
|
|
|
type cardmgr_dev_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_chr_files_pattern($1, device_t, cardmgr_dev_t)
|
2005-11-08 22:00:30 +00:00
|
|
|
')
|
|
|
|
|
2005-07-15 15:17:57 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to read and
|
|
|
|
## write the PCMCIA card manager device.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-15 15:17:57 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-15 15:17:57 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_dontaudit_rw_cardmgr',`
|
|
|
|
gen_require(`
|
|
|
|
type cardmgr_dev_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 cardmgr_dev_t:chr_file { read write };
|
|
|
|
')
|
|
|
|
|
2009-08-25 13:56:56 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete
|
|
|
|
## the PCMCIA card manager device
|
|
|
|
## with the correct type.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_create_cardmgr_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, cardmgr_dev_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
create_chr_files_pattern($1, device_t, cardmgr_dev_t)
|
|
|
|
create_blk_files_pattern($1, device_t, cardmgr_dev_t)
|
|
|
|
')
|
|
|
|
|
2005-11-29 21:27:15 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete
|
|
|
|
## the PCMCIA card manager device.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-29 21:27:15 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-11-29 21:27:15 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_manage_cardmgr_dev',`
|
2005-11-29 21:27:15 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t, cardmgr_dev_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_chr_files_pattern($1, device_t, cardmgr_dev_t)
|
|
|
|
manage_blk_files_pattern($1, device_t, cardmgr_dev_t)
|
2005-11-29 21:27:15 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2009-08-25 13:56:56 +00:00
|
|
|
## Automatic type transition to the type
|
|
|
|
## for PCMCIA card manager device nodes when
|
|
|
|
## created in /dev.
|
2005-11-29 21:27:15 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-29 21:27:15 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-11-29 21:27:15 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2009-08-25 13:56:56 +00:00
|
|
|
interface(`dev_filetrans_cardmgr',`
|
2005-11-29 21:27:15 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t, cardmgr_dev_t;
|
|
|
|
')
|
|
|
|
|
2009-06-26 14:40:13 +00:00
|
|
|
filetrans_pattern($1, device_t, cardmgr_dev_t, { chr_file blk_file })
|
2005-11-29 21:27:15 +00:00
|
|
|
')
|
|
|
|
|
2005-09-20 18:15:35 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of the CPU
|
|
|
|
## microcode and id interfaces.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-20 18:15:35 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-20 18:15:35 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_getattr_cpu_dev',`
|
2005-09-20 18:15:35 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t, cpu_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_chr_files_pattern($1, device_t, cpu_device_t)
|
2005-09-20 18:15:35 +00:00
|
|
|
')
|
|
|
|
|
2009-03-05 15:36:41 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Set the attributes of the CPU
|
|
|
|
## microcode and id interfaces.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_setattr_cpu_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, cpu_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
setattr_chr_files_pattern($1, device_t, cpu_device_t)
|
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Read the CPU identity.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-07-15 14:30:19 +00:00
|
|
|
interface(`dev_read_cpuid',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, cpu_device_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_chr_files_pattern($1, device_t, cpu_device_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Read and write the the CPU microcode device. This
|
|
|
|
## is required to load CPU microcode.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-07-15 14:30:19 +00:00
|
|
|
interface(`dev_rw_cpu_microcode',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, cpu_device_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_chr_files_pattern($1, device_t, cpu_device_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-10-12 16:23:22 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write the the hardware SSL accelerator.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-12 16:23:22 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-12 16:23:22 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_rw_crypto',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, crypt_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_chr_files_pattern($1, device_t, crypt_device_t)
|
2005-10-12 16:23:22 +00:00
|
|
|
')
|
|
|
|
|
2006-02-22 21:21:26 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## getattr the dri devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_getattr_dri_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, dri_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_chr_files_pattern($1, device_t, dri_device_t)
|
2006-02-22 21:21:26 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Setattr the dri devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_setattr_dri_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, dri_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
setattr_chr_files_pattern($1, device_t, dri_device_t)
|
2006-02-22 21:21:26 +00:00
|
|
|
')
|
|
|
|
|
2005-05-30 21:17:20 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2006-01-19 21:04:33 +00:00
|
|
|
## Read and write the dri devices.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-30 21:17:20 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_rw_dri',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, dri_device_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_chr_files_pattern($1, device_t, dri_device_t)
|
2005-05-30 21:17:20 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2006-01-19 21:04:33 +00:00
|
|
|
## Dontaudit read and write on the dri devices.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-19 21:04:33 +00:00
|
|
|
## Domain to dontaudit access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-30 21:17:20 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_dontaudit_rw_dri',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
2006-01-19 21:04:33 +00:00
|
|
|
type dri_device_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2009-03-05 15:36:41 +00:00
|
|
|
dontaudit $1 dri_device_t:chr_file rw_chr_file_perms;
|
2005-05-30 21:17:20 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2006-01-19 21:04:33 +00:00
|
|
|
## Create, read, write, and delete the dri devices.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-19 21:04:33 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2006-01-19 21:04:33 +00:00
|
|
|
interface(`dev_manage_dri_dev',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
2006-01-19 21:04:33 +00:00
|
|
|
type device_t, dri_device_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_chr_files_pattern($1, device_t, dri_device_t)
|
2009-08-25 13:43:38 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Automatic type transition to the type
|
|
|
|
## for DRI device nodes when created in /dev.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_filetrans_dri',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, dri_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
filetrans_pattern($1, device_t, dri_device_t, chr_file)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2007-10-29 18:35:32 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of the event devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_getattr_input_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, event_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 device_t:dir list_dir_perms;
|
|
|
|
allow $1 event_device_t:chr_file getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Set the attributes of the event devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_setattr_input_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, event_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 device_t:dir list_dir_perms;
|
|
|
|
allow $1 event_device_t:chr_file setattr;
|
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Read input event devices (/dev/input).
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-07-15 14:30:19 +00:00
|
|
|
interface(`dev_read_input',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, event_device_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_chr_files_pattern($1, device_t, event_device_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2006-01-19 21:04:33 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read input event devices (/dev/input).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-19 21:04:33 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-19 21:04:33 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_rw_input_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, event_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_chr_files_pattern($1, device_t, event_device_t)
|
2006-01-19 21:04:33 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Get the attributes of the framebuffer device node.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_getattr_framebuffer_dev',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, framebuf_device_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_chr_files_pattern($1, device_t, framebuf_device_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Set the attributes of the framebuffer device node.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_setattr_framebuffer_dev',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, framebuf_device_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
setattr_chr_files_pattern($1, device_t, framebuf_device_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Dot not audit attempts to set the attributes
|
|
|
|
## of the framebuffer device node.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_dontaudit_setattr_framebuffer_dev',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type framebuf_device_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-07-15 14:30:19 +00:00
|
|
|
dontaudit $1 framebuf_device_t:chr_file setattr;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-09 19:55:01 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Read the framebuffer.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-09 19:55:01 +00:00
|
|
|
#
|
2005-07-15 14:30:19 +00:00
|
|
|
interface(`dev_read_framebuffer',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type framebuf_device_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_chr_files_pattern($1, device_t, framebuf_device_t)
|
2005-05-09 19:55:01 +00:00
|
|
|
')
|
|
|
|
|
2005-05-30 21:17:20 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Do not audit attempts to read the framebuffer.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-30 21:17:20 +00:00
|
|
|
#
|
2005-07-15 14:30:19 +00:00
|
|
|
interface(`dev_dontaudit_read_framebuffer',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type framebuf_device_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-07-15 14:30:19 +00:00
|
|
|
dontaudit $1 framebuf_device_t:chr_file { getattr read };
|
2005-05-30 21:17:20 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Write the framebuffer.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-07-15 14:30:19 +00:00
|
|
|
interface(`dev_write_framebuffer',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, framebuf_device_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
write_chr_files_pattern($1, device_t, framebuf_device_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2006-01-19 21:04:33 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write the framebuffer.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-19 21:04:33 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-19 21:04:33 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_rw_framebuffer',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, framebuf_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_chr_files_pattern($1, device_t, framebuf_device_t)
|
2006-01-19 21:04:33 +00:00
|
|
|
')
|
|
|
|
|
2009-03-05 15:36:41 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read the kernel messages
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_read_kmsg',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, kmsg_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
read_chr_files_pattern($1, device_t, kmsg_device_t)
|
|
|
|
')
|
|
|
|
|
2009-11-19 14:44:19 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of the ksm devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_getattr_ksm_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, ksm_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
getattr_chr_files_pattern($1, device_t, ksm_device_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Set the attributes of the ksm devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_setattr_ksm_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, ksm_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
setattr_chr_files_pattern($1, device_t, ksm_device_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read the ksm devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_read_ksm',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, ksm_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
read_chr_files_pattern($1, device_t, ksm_device_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write to ksm devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_rw_ksm',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, ksm_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
rw_chr_files_pattern($1, device_t, ksm_device_t)
|
|
|
|
')
|
|
|
|
|
2009-03-05 15:36:41 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of the kvm devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_getattr_kvm_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, kvm_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
getattr_chr_files_pattern($1, device_t, kvm_device_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Set the attributes of the kvm devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_setattr_kvm_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, kvm_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
setattr_chr_files_pattern($1, device_t, kvm_device_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read the kvm devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_read_kvm',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, kvm_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
read_chr_files_pattern($1, device_t, kvm_device_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2009-06-26 14:40:13 +00:00
|
|
|
## Read and write to kvm devices.
|
2009-03-05 15:36:41 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2009-06-26 14:40:13 +00:00
|
|
|
## Domain allowed access.
|
2009-03-05 15:36:41 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_rw_kvm',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, kvm_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
rw_chr_files_pattern($1, device_t, kvm_device_t)
|
|
|
|
')
|
|
|
|
|
2009-11-19 14:44:19 +00:00
|
|
|
######################################
|
|
|
|
## <summary>
|
|
|
|
## Read the lirc device.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_read_lirc',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, lirc_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
read_chr_files_pattern($1, device_t, lirc_device_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
######################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write the lirc device.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_rw_lirc',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, lirc_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
rw_chr_files_pattern($1, device_t, lirc_device_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
######################################
|
|
|
|
## <summary>
|
|
|
|
## Automatic type transition to the type
|
|
|
|
## for lirc device nodes when created in /dev.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_filetrans_lirc',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, lirc_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
filetrans_pattern($1, device_t, lirc_device_t, chr_file)
|
|
|
|
')
|
|
|
|
|
2005-05-05 21:19:18 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Read the lvm comtrol device.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-05 21:19:18 +00:00
|
|
|
#
|
2005-07-15 14:30:19 +00:00
|
|
|
interface(`dev_read_lvm_control',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, lvm_control_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_chr_files_pattern($1, device_t, lvm_control_t)
|
2005-05-05 21:19:18 +00:00
|
|
|
')
|
|
|
|
|
2005-06-20 17:41:29 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Read and write the lvm control device.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-20 17:41:29 +00:00
|
|
|
#
|
2005-07-15 14:30:19 +00:00
|
|
|
interface(`dev_rw_lvm_control',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, lvm_control_t;
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_chr_files_pattern($1, device_t, lvm_control_t)
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
|
|
|
|
2009-11-19 14:44:19 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to read and write lvm control device.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_dontaudit_rw_lvm_control',`
|
|
|
|
gen_require(`
|
|
|
|
type lvm_control_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 lvm_control_t:chr_file rw_file_perms;
|
|
|
|
')
|
|
|
|
|
2005-06-20 17:41:29 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Delete the lvm control device.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-20 17:41:29 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_delete_lvm_control_dev',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, lvm_control_t;
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
delete_chr_files_pattern($1, device_t, lvm_control_t)
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
|
|
|
|
2006-01-17 17:50:10 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## dontaudit getattr raw memory devices (e.g. /dev/mem).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-17 17:50:10 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-17 17:50:10 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_dontaudit_getattr_memory_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type memory_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 memory_device_t:chr_file getattr;
|
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Read raw memory devices (e.g. /dev/mem).
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-07-15 14:30:19 +00:00
|
|
|
interface(`dev_read_raw_memory',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, memory_device_t;
|
|
|
|
attribute memory_raw_read;
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_chr_files_pattern($1, device_t, memory_device_t)
|
2005-07-15 14:30:19 +00:00
|
|
|
|
|
|
|
allow $1 self:capability sys_rawio;
|
|
|
|
typeattribute $1 memory_raw_read;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Write raw memory devices (e.g. /dev/mem).
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-07-15 14:30:19 +00:00
|
|
|
interface(`dev_write_raw_memory',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, memory_device_t;
|
|
|
|
attribute memory_raw_write;
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
write_chr_files_pattern($1, device_t, memory_device_t)
|
2005-07-15 14:30:19 +00:00
|
|
|
|
|
|
|
allow $1 self:capability sys_rawio;
|
|
|
|
typeattribute $1 memory_raw_write;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Read and execute raw memory devices (e.g. /dev/mem).
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-07-15 14:30:19 +00:00
|
|
|
interface(`dev_rx_raw_memory',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, memory_device_t;
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-07-15 14:30:19 +00:00
|
|
|
dev_read_raw_memory($1)
|
|
|
|
allow $1 memory_device_t:chr_file execute;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Write and execute raw memory devices (e.g. /dev/mem).
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-07-15 14:30:19 +00:00
|
|
|
interface(`dev_wx_raw_memory',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, memory_device_t;
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-07-15 14:30:19 +00:00
|
|
|
dev_write_raw_memory($1)
|
|
|
|
allow $1 memory_device_t:chr_file execute;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Get the attributes of miscellaneous devices.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_getattr_misc_dev',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, misc_device_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_chr_files_pattern($1, device_t, misc_device_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-16 21:10:33 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Do not audit attempts to get the attributes
|
|
|
|
## of miscellaneous devices.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-16 21:10:33 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_dontaudit_getattr_misc_dev',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type misc_device_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-07-15 14:30:19 +00:00
|
|
|
dontaudit $1 misc_device_t:chr_file getattr;
|
2005-05-16 21:10:33 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Set the attributes of miscellaneous devices.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_setattr_misc_dev',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, misc_device_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
setattr_chr_files_pattern($1, device_t, misc_device_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-16 21:10:33 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Do not audit attempts to set the attributes
|
|
|
|
## of miscellaneous devices.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-16 21:10:33 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_dontaudit_setattr_misc_dev',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type misc_device_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-07-15 14:30:19 +00:00
|
|
|
dontaudit $1 misc_device_t:chr_file setattr;
|
2005-05-16 21:10:33 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Read miscellaneous devices.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-07-15 14:30:19 +00:00
|
|
|
interface(`dev_read_misc',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, misc_device_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_chr_files_pattern($1, device_t, misc_device_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Write miscellaneous devices.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-07-15 14:30:19 +00:00
|
|
|
interface(`dev_write_misc',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, misc_device_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
write_chr_files_pattern($1, device_t, misc_device_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2006-01-20 22:02:24 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to read and write miscellaneous devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-20 22:02:24 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-20 22:02:24 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_dontaudit_rw_misc',`
|
|
|
|
gen_require(`
|
|
|
|
type misc_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 misc_device_t:chr_file rw_file_perms;
|
|
|
|
')
|
|
|
|
|
2009-11-19 14:44:19 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of the modem devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_getattr_modem_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, modem_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
getattr_chr_files_pattern($1, device_t, modem_device_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Set the attributes of the modem devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_setattr_modem_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, modem_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
setattr_chr_files_pattern($1, device_t, modem_device_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read the modem devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_read_modem',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, modem_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
read_chr_files_pattern($1, device_t, modem_device_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write to modem devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_rw_modem',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, modem_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
rw_chr_files_pattern($1, device_t, modem_device_t)
|
|
|
|
')
|
|
|
|
|
2005-06-20 17:41:29 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Get the attributes of the mouse devices.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-20 17:41:29 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_getattr_mouse_dev',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, mouse_device_t;
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_chr_files_pattern($1, device_t, mouse_device_t)
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Set the attributes of the mouse devices.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-20 17:41:29 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_setattr_mouse_dev',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, mouse_device_t;
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
setattr_chr_files_pattern($1, device_t, mouse_device_t)
|
2005-06-30 18:54:08 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Read the mouse devices.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-07-15 14:30:19 +00:00
|
|
|
interface(`dev_read_mouse',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, mouse_device_t;
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_chr_files_pattern($1, device_t, mouse_device_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-09-23 19:38:34 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2008-12-03 19:16:20 +00:00
|
|
|
## Read and write to mouse devices.
|
2005-09-23 19:38:34 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2008-12-03 19:16:20 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-23 19:38:34 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_rw_mouse',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, mouse_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_chr_files_pattern($1, device_t, mouse_device_t)
|
2005-09-23 19:38:34 +00:00
|
|
|
')
|
|
|
|
|
2005-10-31 22:19:16 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2006-08-01 14:43:10 +00:00
|
|
|
## Get the attributes of the memory type range
|
|
|
|
## registers (MTRR) device.
|
2005-10-31 22:19:16 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-31 22:19:16 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-31 22:19:16 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_getattr_mtrr_dev',`
|
2005-10-31 22:19:16 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t, mtrr_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_files_pattern($1, device_t, mtrr_device_t)
|
|
|
|
getattr_chr_files_pattern($1, device_t, mtrr_device_t)
|
2005-10-31 22:19:16 +00:00
|
|
|
')
|
|
|
|
|
2005-05-26 20:38:45 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2006-08-01 14:43:10 +00:00
|
|
|
## Read the memory type range
|
|
|
|
## registers (MTRR). (Deprecated)
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
2006-08-01 14:43:10 +00:00
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## Read the memory type range
|
|
|
|
## registers (MTRR). This interface has
|
|
|
|
## been deprecated, dev_rw_mtrr() should be
|
|
|
|
## used instead.
|
|
|
|
## </p>
|
|
|
|
## <p>
|
|
|
|
## The MTRR device ioctls can be used for
|
|
|
|
## reading and writing; thus, read access to the
|
|
|
|
## device cannot be separated from write access.
|
|
|
|
## </p>
|
|
|
|
## </desc>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-26 20:38:45 +00:00
|
|
|
#
|
2005-07-15 14:30:19 +00:00
|
|
|
interface(`dev_read_mtrr',`
|
2006-08-01 14:43:10 +00:00
|
|
|
refpolicywarn(`$0($*) has been replaced with dev_rw_mtrr().')
|
|
|
|
dev_rw_mtrr($1)
|
2005-05-26 20:38:45 +00:00
|
|
|
')
|
|
|
|
|
2005-05-13 14:37:13 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2006-08-01 14:43:10 +00:00
|
|
|
## Write the memory type range
|
|
|
|
## registers (MTRR). (Deprecated)
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
2006-08-01 14:43:10 +00:00
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## Write the memory type range
|
|
|
|
## registers (MTRR). This interface has
|
|
|
|
## been deprecated, dev_rw_mtrr() should be
|
|
|
|
## used instead.
|
|
|
|
## </p>
|
|
|
|
## <p>
|
|
|
|
## The MTRR device ioctls can be used for
|
|
|
|
## reading and writing; thus, write access to the
|
|
|
|
## device cannot be separated from read access.
|
|
|
|
## </p>
|
|
|
|
## </desc>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-13 14:37:13 +00:00
|
|
|
#
|
2005-07-15 14:30:19 +00:00
|
|
|
interface(`dev_write_mtrr',`
|
2006-08-01 14:43:10 +00:00
|
|
|
refpolicywarn(`$0($*) has been replaced with dev_rw_mtrr().')
|
|
|
|
dev_rw_mtrr($1)
|
2005-05-26 20:38:45 +00:00
|
|
|
')
|
|
|
|
|
2006-01-19 21:04:33 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2006-08-01 14:43:10 +00:00
|
|
|
## Read and write the memory type range registers (MTRR).
|
2006-01-19 21:04:33 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-19 21:04:33 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-19 21:04:33 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_rw_mtrr',`
|
2006-08-01 14:43:10 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t, mtrr_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_files_pattern($1, device_t, mtrr_device_t)
|
|
|
|
rw_chr_files_pattern($1, device_t, mtrr_device_t)
|
2006-01-19 21:04:33 +00:00
|
|
|
')
|
|
|
|
|
2009-03-05 15:36:41 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of the network control device
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_getattr_netcontrol_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, netcontrol_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
getattr_chr_files_pattern($1, device_t, netcontrol_device_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read the network control identity.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_read_netcontrol',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, netcontrol_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
read_chr_files_pattern($1, device_t, netcontrol_device_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write the the network control device.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_rw_netcontrol',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, netcontrol_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
rw_chr_files_pattern($1, device_t, netcontrol_device_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of the null device nodes.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_getattr_null_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, null_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
getattr_chr_files_pattern($1, device_t, null_device_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Set the attributes of the null device nodes.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_setattr_null_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, null_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
setattr_chr_files_pattern($1, device_t, null_device_t)
|
|
|
|
')
|
|
|
|
|
2009-11-19 14:44:19 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Delete the null device (/dev/null).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_delete_null',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, null_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
delete_chr_files_pattern($1, device_t, null_device_t)
|
|
|
|
')
|
|
|
|
|
2005-06-20 17:41:29 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Read and write to the null device (/dev/null).
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-20 17:41:29 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_rw_null',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, null_device_t;
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_chr_files_pattern($1, device_t, null_device_t)
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
|
|
|
|
2006-08-23 03:47:39 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create the null device (/dev/null).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_create_null_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, null_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
create_chr_files_pattern($1, device_t, null_device_t)
|
2006-08-23 03:47:39 +00:00
|
|
|
')
|
|
|
|
|
2006-09-29 14:24:57 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to get the attributes
|
|
|
|
## of the BIOS non-volatile RAM device.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_dontaudit_getattr_nvram_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type nvram_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 nvram_device_t:chr_file getattr;
|
|
|
|
')
|
|
|
|
|
2006-08-29 02:41:00 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write BIOS non-volatile RAM.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_rw_nvram',`
|
|
|
|
gen_require(`
|
|
|
|
type nvram_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_chr_files_pattern($1, device_t, nvram_device_t)
|
2006-08-29 02:41:00 +00:00
|
|
|
')
|
|
|
|
|
2006-06-08 17:18:25 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of the printer device nodes.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_getattr_printer_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, printer_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_chr_files_pattern($1, device_t, printer_device_t)
|
2006-06-08 17:18:25 +00:00
|
|
|
')
|
|
|
|
|
2005-06-20 17:41:29 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Set the attributes of the printer device nodes.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-20 17:41:29 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_setattr_printer_dev',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, printer_device_t;
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
setattr_chr_files_pattern($1, device_t, printer_device_t)
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
|
|
|
|
2005-10-22 21:09:03 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Append the printer device.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-22 21:09:03 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-22 21:09:03 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
# cjp: added for lpd/checkpc_t
|
|
|
|
interface(`dev_append_printer',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, printer_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
append_chr_files_pattern($1, device_t, printer_device_t)
|
2005-10-22 21:09:03 +00:00
|
|
|
')
|
|
|
|
|
2005-09-02 20:29:52 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write the printer device.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-02 20:29:52 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-02 20:29:52 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_rw_printer',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, printer_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_chr_files_pattern($1, device_t, printer_device_t)
|
2005-09-02 20:29:52 +00:00
|
|
|
')
|
|
|
|
|
2009-03-05 15:36:41 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read printk devices (e.g., /dev/kmsg /dev/mcelog)
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_read_printk',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, printk_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
read_chr_files_pattern($1, device_t, printk_device_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of the QEMU
|
|
|
|
## microcode and id interfaces.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_getattr_qemu_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, qemu_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
getattr_chr_files_pattern($1, device_t, qemu_device_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Set the attributes of the QEMU
|
|
|
|
## microcode and id interfaces.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_setattr_qemu_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, qemu_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
setattr_chr_files_pattern($1, device_t, qemu_device_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read the QEMU device
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_read_qemu',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, qemu_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
read_chr_files_pattern($1, device_t, qemu_device_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write the the QEMU device.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_rw_qemu',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, qemu_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
rw_chr_files_pattern($1, device_t, qemu_device_t)
|
|
|
|
')
|
|
|
|
|
2005-06-20 17:41:29 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2006-01-18 14:48:24 +00:00
|
|
|
## Read from random number generator
|
|
|
|
## devices (e.g., /dev/random)
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-20 17:41:29 +00:00
|
|
|
#
|
2005-07-15 14:30:19 +00:00
|
|
|
interface(`dev_read_rand',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, random_device_t;
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_chr_files_pattern($1, device_t, random_device_t)
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
|
|
|
|
2006-01-18 14:48:24 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to read from random
|
|
|
|
## number generator devices (e.g., /dev/random)
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-18 14:48:24 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-18 14:48:24 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_dontaudit_read_rand',`
|
|
|
|
gen_require(`
|
|
|
|
type random_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 random_device_t:chr_file { getattr read };
|
|
|
|
')
|
|
|
|
|
2009-03-05 15:36:41 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to append to random
|
|
|
|
## number generator devices (e.g., /dev/random)
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_dontaudit_append_rand',`
|
|
|
|
gen_require(`
|
|
|
|
type random_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 random_device_t:chr_file append_chr_file_perms;
|
|
|
|
')
|
|
|
|
|
2005-06-20 17:41:29 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Write to the random device (e.g., /dev/random). This adds
|
|
|
|
## entropy used to generate the random data read from the
|
|
|
|
## random device.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-20 17:41:29 +00:00
|
|
|
#
|
2005-07-15 14:30:19 +00:00
|
|
|
interface(`dev_write_rand',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, random_device_t;
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
write_chr_files_pattern($1, device_t, random_device_t)
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Read the realtime clock (/dev/rtc).
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-07-15 14:30:19 +00:00
|
|
|
interface(`dev_read_realtime_clock',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, clock_device_t;
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_chr_files_pattern($1, device_t, clock_device_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Set the realtime clock (/dev/rtc).
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-07-15 14:30:19 +00:00
|
|
|
interface(`dev_write_realtime_clock',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, clock_device_t;
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
write_chr_files_pattern($1, device_t, clock_device_t)
|
2006-12-12 20:08:08 +00:00
|
|
|
|
|
|
|
allow $1 clock_device_t:chr_file setattr;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-06-20 17:41:29 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Read and set the realtime clock (/dev/rtc).
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-20 17:41:29 +00:00
|
|
|
#
|
2005-07-15 14:30:19 +00:00
|
|
|
interface(`dev_rw_realtime_clock',`
|
|
|
|
dev_read_realtime_clock($1)
|
|
|
|
dev_write_realtime_clock($1)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Get the attributes of the scanner device.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_getattr_scanner_dev',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, scanner_device_t;
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_chr_files_pattern($1, device_t, scanner_device_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-06-20 17:41:29 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Do not audit attempts to get the attributes of
|
|
|
|
## the scanner device.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-20 17:41:29 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_dontaudit_getattr_scanner_dev',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type scanner_device_t;
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-07-15 14:30:19 +00:00
|
|
|
dontaudit $1 scanner_device_t:chr_file getattr;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Set the attributes of the scanner device.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-08 20:44:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-08 20:44:57 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_setattr_scanner_dev',`
|
2005-07-08 20:44:57 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, scanner_device_t;
|
2005-07-08 20:44:57 +00:00
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
setattr_chr_files_pattern($1, device_t, scanner_device_t)
|
2005-07-08 20:44:57 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Do not audit attempts to set the attributes of
|
|
|
|
## the scanner device.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_dontaudit_setattr_scanner_dev',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type scanner_device_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-07-15 14:30:19 +00:00
|
|
|
dontaudit $1 scanner_device_t:chr_file setattr;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Read and write the scanner device.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-07-15 14:30:19 +00:00
|
|
|
interface(`dev_rw_scanner',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, scanner_device_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_chr_files_pattern($1, device_t, scanner_device_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Get the attributes of the sound devices.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_getattr_sound_dev',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, sound_device_t;
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_chr_files_pattern($1, device_t, sound_device_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-06-20 17:41:29 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Set the attributes of the sound devices.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-20 17:41:29 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_setattr_sound_dev',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, sound_device_t;
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
setattr_chr_files_pattern($1, device_t, sound_device_t)
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Read the sound devices.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-20 17:41:29 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_read_sound',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, sound_device_t;
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_chr_files_pattern($1, device_t, sound_device_t)
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Write the sound devices.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-20 17:41:29 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_write_sound',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, sound_device_t;
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
write_chr_files_pattern($1, device_t, sound_device_t)
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Read the sound mixer devices.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-20 17:41:29 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_read_sound_mixer',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, sound_device_t;
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_chr_files_pattern($1, device_t, sound_device_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Write the sound mixer devices.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_write_sound_mixer',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
2005-07-15 14:30:19 +00:00
|
|
|
type device_t, sound_device_t;
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
write_chr_files_pattern($1, device_t, sound_device_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-06-20 17:41:29 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Get the attributes of the the power management device.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-20 17:41:29 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_getattr_power_mgmt_dev',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t, power_device_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_chr_files_pattern($1, device_t, power_device_t)
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Set the attributes of the the power management device.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-20 17:41:29 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_setattr_power_mgmt_dev',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t, power_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
setattr_chr_files_pattern($1, device_t, power_device_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Read and write the the power management device.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`dev_rw_power_management',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t, power_device_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_chr_files_pattern($1, device_t, power_device_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2007-06-11 15:01:10 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Getattr on smartcard devices
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_getattr_smartcard_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type smartcard_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 smartcard_device_t:chr_file getattr;
|
|
|
|
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## dontaudit getattr on smartcard devices
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_dontaudit_getattr_smartcard_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type smartcard_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 smartcard_device_t:chr_file getattr;
|
|
|
|
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write smartcard devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_rw_smartcard',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, smartcard_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_chr_files_pattern($1, device_t, smartcard_device_t)
|
2007-06-11 15:01:10 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete smartcard devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_manage_smartcard',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, smartcard_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_chr_files_pattern($1, device_t, smartcard_device_t)
|
2007-06-11 15:01:10 +00:00
|
|
|
')
|
|
|
|
|
2005-06-20 17:41:29 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Get the attributes of sysfs directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The type of the process performing this action.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-20 17:41:29 +00:00
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_getattr_sysfs_dirs',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type sysfs_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 sysfs_t:dir getattr_dir_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
2005-05-31 21:25:45 +00:00
|
|
|
|
2005-06-14 19:56:46 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-07-12 20:34:24 +00:00
|
|
|
## Search the sysfs directories.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The type of the process performing this action.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-14 19:56:46 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`dev_search_sysfs',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type sysfs_t;
|
|
|
|
')
|
2005-06-14 19:56:46 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
search_dirs_pattern($1, sysfs_t, sysfs_t)
|
2005-06-14 19:56:46 +00:00
|
|
|
')
|
|
|
|
|
2005-06-29 20:53:53 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to search sysfs.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-29 20:53:53 +00:00
|
|
|
## The type of the process performing this action.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-29 20:53:53 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_dontaudit_search_sysfs',`
|
|
|
|
gen_require(`
|
|
|
|
type sysfs_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
dontaudit $1 sysfs_t:dir search_dir_perms;
|
2005-06-29 20:53:53 +00:00
|
|
|
')
|
|
|
|
|
2005-07-12 20:34:24 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## List the contents of the sysfs directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-12 20:34:24 +00:00
|
|
|
## The type of the process performing this action.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-12 20:34:24 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_list_sysfs',`
|
|
|
|
gen_require(`
|
|
|
|
type sysfs_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
list_dirs_pattern($1, sysfs_t, sysfs_t)
|
2005-07-12 20:34:24 +00:00
|
|
|
')
|
|
|
|
|
2007-03-26 20:47:29 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Write in a sysfs directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
# cjp: added for cpuspeed
|
|
|
|
interface(`dev_write_sysfs_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
type sysfs_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 sysfs_t:dir write;
|
|
|
|
')
|
|
|
|
|
2005-06-14 19:56:46 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Allow caller to read hardware state information.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The process type reading hardware state information.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-14 19:56:46 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`dev_read_sysfs',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type sysfs_t;
|
|
|
|
')
|
2005-06-14 19:56:46 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern($1, sysfs_t, sysfs_t)
|
|
|
|
read_lnk_files_pattern($1, sysfs_t, sysfs_t)
|
2006-12-12 20:08:08 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
list_dirs_pattern($1, sysfs_t, sysfs_t)
|
2005-06-14 19:56:46 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Allow caller to modify hardware state information.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The process type modifying hardware state information.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-14 19:56:46 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`dev_rw_sysfs',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type sysfs_t;
|
|
|
|
')
|
2005-06-14 19:56:46 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_files_pattern($1, sysfs_t, sysfs_t)
|
|
|
|
read_lnk_files_pattern($1, sysfs_t, sysfs_t)
|
2006-12-12 20:08:08 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
list_dirs_pattern($1, sysfs_t, sysfs_t)
|
2005-06-14 19:56:46 +00:00
|
|
|
')
|
|
|
|
|
2005-07-15 14:30:19 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read from pseudo random devices (e.g., /dev/urandom)
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_read_urand',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, urandom_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_chr_files_pattern($1, device_t, urandom_device_t)
|
2005-07-15 14:30:19 +00:00
|
|
|
')
|
|
|
|
|
2006-04-28 20:20:40 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to read from pseudo
|
|
|
|
## random devices (e.g., /dev/urandom)
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_dontaudit_read_urand',`
|
|
|
|
gen_require(`
|
|
|
|
type urandom_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 urandom_device_t:chr_file { getattr read };
|
|
|
|
')
|
|
|
|
|
2005-07-15 14:30:19 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Write to the pseudo random device (e.g., /dev/urandom). This
|
|
|
|
## sets the random number generator seed.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_write_urand',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, urandom_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
write_chr_files_pattern($1, device_t, urandom_device_t)
|
2005-07-15 14:30:19 +00:00
|
|
|
')
|
|
|
|
|
2006-03-30 15:59:39 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Getattr generic the USB devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_getattr_generic_usb_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type usb_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_chr_files_pattern($1, device_t, usb_device_t)
|
2006-03-30 15:59:39 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Setattr generic the USB devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_setattr_generic_usb_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type usb_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
setattr_chr_files_pattern($1, device_t, usb_device_t)
|
2006-03-30 15:59:39 +00:00
|
|
|
')
|
|
|
|
|
2009-03-05 15:36:41 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read generic the USB devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_read_generic_usb_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type usb_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
read_chr_files_pattern($1, device_t, usb_device_t)
|
|
|
|
')
|
|
|
|
|
2006-02-16 19:32:13 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write generic the USB devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_rw_generic_usb_dev',`
|
|
|
|
gen_require(`
|
2009-06-08 17:18:26 +00:00
|
|
|
type device_t, usb_device_t;
|
2006-02-16 19:32:13 +00:00
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_chr_files_pattern($1, device_t, usb_device_t)
|
2006-02-16 19:32:13 +00:00
|
|
|
')
|
|
|
|
|
2005-06-30 18:54:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Mount a usbfs filesystem.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-30 18:54:08 +00:00
|
|
|
## The type of the process performing this action.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-30 18:54:08 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_mount_usbfs',`
|
|
|
|
gen_require(`
|
|
|
|
type usbfs_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 usbfs_t:filesystem mount;
|
|
|
|
')
|
|
|
|
|
2005-10-25 02:51:07 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2006-01-31 15:59:20 +00:00
|
|
|
## Associate a file to a usbfs filesystem.
|
2005-10-25 02:51:07 +00:00
|
|
|
## </summary>
|
2006-01-31 15:59:20 +00:00
|
|
|
## <param name="file_type">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-31 15:59:20 +00:00
|
|
|
## The type of the file to be associated to usbfs.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-25 02:51:07 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_associate_usbfs',`
|
|
|
|
gen_require(`
|
|
|
|
type usbfs_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 usbfs_t:filesystem associate;
|
|
|
|
')
|
|
|
|
|
2005-07-08 20:44:57 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of a directory in the usb filesystem.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-08 20:44:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-08 20:44:57 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_getattr_usbfs_dirs',`
|
2005-07-08 20:44:57 +00:00
|
|
|
gen_require(`
|
|
|
|
type usbfs_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 usbfs_t:dir getattr_dir_perms;
|
2005-07-08 20:44:57 +00:00
|
|
|
')
|
|
|
|
|
2005-11-08 22:00:30 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to get the attributes
|
|
|
|
## of a directory in the usb filesystem.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_dontaudit_getattr_usbfs_dirs',`
|
2005-11-08 22:00:30 +00:00
|
|
|
gen_require(`
|
|
|
|
type usbfs_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
dontaudit $1 usbfs_t:dir getattr_dir_perms;
|
2005-11-08 22:00:30 +00:00
|
|
|
')
|
|
|
|
|
2005-06-14 19:56:46 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Search the directory containing USB hardware information.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The type of the process performing this action.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-14 19:56:46 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`dev_search_usbfs',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type usbfs_t;
|
|
|
|
')
|
2005-06-14 19:56:46 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
search_dirs_pattern($1, usbfs_t, usbfs_t)
|
2005-06-14 19:56:46 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Allow caller to get a list of usb hardware.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The process type getting the list.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-14 19:56:46 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`dev_list_usbfs',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type usbfs_t;
|
|
|
|
')
|
2005-06-14 19:56:46 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_lnk_files_pattern($1, usbfs_t, usbfs_t)
|
|
|
|
getattr_files_pattern($1, usbfs_t, usbfs_t)
|
2006-12-12 20:08:08 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
list_dirs_pattern($1, usbfs_t, usbfs_t)
|
2005-06-14 19:56:46 +00:00
|
|
|
')
|
|
|
|
|
2006-04-12 16:58:23 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Set the attributes of usbfs filesystem.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_setattr_usbfs_files',`
|
|
|
|
gen_require(`
|
|
|
|
type usbfs_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
setattr_files_pattern($1, usbfs_t, usbfs_t)
|
|
|
|
list_dirs_pattern($1, usbfs_t, usbfs_t)
|
2006-04-12 16:58:23 +00:00
|
|
|
')
|
|
|
|
|
2005-06-14 19:56:46 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Read USB hardware information using
|
|
|
|
## the usbfs filesystem interface.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The type of the process performing this action.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-14 19:56:46 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`dev_read_usbfs',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type usbfs_t;
|
|
|
|
')
|
2005-06-14 19:56:46 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern($1, usbfs_t, usbfs_t)
|
|
|
|
read_lnk_files_pattern($1, usbfs_t, usbfs_t)
|
|
|
|
list_dirs_pattern($1, usbfs_t, usbfs_t)
|
2005-06-14 19:56:46 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Allow caller to modify usb hardware configuration files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The process type modifying the options.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-14 19:56:46 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`dev_rw_usbfs',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type usbfs_t;
|
|
|
|
')
|
2005-06-14 19:56:46 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
list_dirs_pattern($1, usbfs_t, usbfs_t)
|
|
|
|
rw_files_pattern($1, usbfs_t, usbfs_t)
|
|
|
|
read_lnk_files_pattern($1, usbfs_t, usbfs_t)
|
2005-06-14 19:56:46 +00:00
|
|
|
')
|
|
|
|
|
2005-06-20 17:41:29 +00:00
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Get the attributes of video4linux devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-30 18:54:08 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-20 17:41:29 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`dev_getattr_video_dev',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t, v4l_device_t;
|
|
|
|
')
|
2005-06-14 19:56:46 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_chr_files_pattern($1, device_t, v4l_device_t)
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-06-23 21:30:57 +00:00
|
|
|
## <summary>
|
2005-06-30 18:54:08 +00:00
|
|
|
## Do not audit attempts to get the attributes
|
|
|
|
## of video4linux device nodes.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-30 18:54:08 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-30 18:54:08 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_dontaudit_getattr_video_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type v4l_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 v4l_device_t:chr_file getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Set the attributes of video4linux device nodes.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-30 18:54:08 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-06-20 17:41:29 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`dev_setattr_video_dev',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t, v4l_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
setattr_chr_files_pattern($1, device_t, v4l_device_t)
|
2005-06-14 19:56:46 +00:00
|
|
|
')
|
|
|
|
|
2005-06-30 18:54:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to set the attributes
|
|
|
|
## of video4linux device nodes.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-30 18:54:08 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-30 18:54:08 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_dontaudit_setattr_video_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type v4l_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 v4l_device_t:chr_file setattr;
|
|
|
|
')
|
2005-07-05 20:59:51 +00:00
|
|
|
|
2006-03-09 20:28:51 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read the video4linux devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_read_video_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, v4l_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_chr_files_pattern($1, device_t, v4l_device_t)
|
2006-03-09 20:28:51 +00:00
|
|
|
')
|
|
|
|
|
2007-05-07 17:57:48 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Write the video4linux devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_write_video_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, v4l_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
write_chr_files_pattern($1, device_t, v4l_device_t)
|
2007-05-07 17:57:48 +00:00
|
|
|
')
|
|
|
|
|
2006-04-26 18:18:15 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write VMWare devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_rw_vmware',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, vmware_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_chr_files_pattern($1, device_t, vmware_device_t)
|
2006-04-26 18:18:15 +00:00
|
|
|
')
|
|
|
|
|
2006-04-26 20:30:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read, write, and mmap VMWare devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_rwx_vmware',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, vmware_device_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
dev_rw_vmware($1)
|
|
|
|
allow $1 vmware_device_t:chr_file execute;
|
2006-04-26 20:30:08 +00:00
|
|
|
')
|
|
|
|
|
2006-04-28 20:20:40 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Write to watchdog devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_write_watchdog',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, watchdog_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
write_chr_files_pattern($1, device_t, watchdog_device_t)
|
2006-04-28 20:20:40 +00:00
|
|
|
')
|
|
|
|
|
2009-11-19 14:44:19 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write the the wireless device.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_rw_wireless',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, wireless_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
rw_chr_files_pattern($1, device_t, wireless_device_t)
|
|
|
|
')
|
|
|
|
|
2006-03-23 19:19:38 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write Xen devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_rw_xen',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, xen_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_chr_files_pattern($1, device_t, xen_device_t)
|
2006-03-23 19:19:38 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete Xen devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_manage_xen',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, xen_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_chr_files_pattern($1, device_t, xen_device_t)
|
2006-03-23 19:19:38 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Automatic type transition to the type
|
|
|
|
## for xen device nodes when created in /dev.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_filetrans_xen',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, xen_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
filetrans_pattern($1, device_t, xen_device_t, chr_file)
|
2006-03-23 19:19:38 +00:00
|
|
|
')
|
|
|
|
|
2005-09-16 21:20:37 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of X server miscellaneous devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-16 21:20:37 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-16 21:20:37 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_getattr_xserver_misc_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, xserver_misc_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_chr_files_pattern($1, device_t, xserver_misc_device_t)
|
2005-09-16 21:20:37 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Set the attributes of X server miscellaneous devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-16 21:20:37 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-16 21:20:37 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_setattr_xserver_misc_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, xserver_misc_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
setattr_chr_files_pattern($1, device_t, xserver_misc_device_t)
|
2005-09-16 21:20:37 +00:00
|
|
|
')
|
|
|
|
|
2006-01-19 21:04:33 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write X server miscellaneous devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-19 21:04:33 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-19 21:04:33 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_rw_xserver_misc',`
|
2006-01-19 21:04:33 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t, xserver_misc_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_chr_files_pattern($1, device_t, xserver_misc_device_t)
|
2006-01-19 21:04:33 +00:00
|
|
|
')
|
|
|
|
|
2005-07-15 14:30:19 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write to the zero device (/dev/zero).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_rw_zero',`
|
2005-07-15 14:30:19 +00:00
|
|
|
gen_require(`
|
|
|
|
type device_t, zero_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
rw_chr_files_pattern($1, device_t, zero_device_t)
|
2005-07-15 14:30:19 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read, write, and execute the zero device (/dev/zero).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-15 14:30:19 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-31 16:08:56 +00:00
|
|
|
interface(`dev_rwx_zero',`
|
2005-07-15 14:30:19 +00:00
|
|
|
gen_require(`
|
|
|
|
type zero_device_t;
|
|
|
|
')
|
|
|
|
|
2006-01-31 16:08:56 +00:00
|
|
|
dev_rw_zero($1)
|
2005-07-15 14:30:19 +00:00
|
|
|
allow $1 zero_device_t:chr_file execute;
|
|
|
|
')
|
|
|
|
|
2006-03-09 20:28:51 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execmod the zero device (/dev/zero).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_execmod_zero',`
|
|
|
|
gen_require(`
|
|
|
|
type zero_device_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dev_rw_zero($1)
|
|
|
|
allow $1 zero_device_t:chr_file execmod;
|
|
|
|
')
|
|
|
|
|
2006-08-23 03:47:39 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create the zero device (/dev/zero).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_create_zero_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type device_t, zero_device_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
create_chr_files_pattern($1, device_t, zero_device_t)
|
2006-08-23 03:47:39 +00:00
|
|
|
')
|
|
|
|
|
2005-07-05 20:59:51 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Unconfined access to devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-05 20:59:51 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-05 20:59:51 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dev_unconfined',`
|
|
|
|
gen_require(`
|
2006-04-10 21:04:51 +00:00
|
|
|
attribute devices_unconfined_type;
|
2005-07-05 20:59:51 +00:00
|
|
|
')
|
|
|
|
|
2006-04-10 21:04:51 +00:00
|
|
|
typeattribute $1 devices_unconfined_type;
|
2005-07-05 20:59:51 +00:00
|
|
|
')
|