2005-04-20 19:07:16 +00:00
|
|
|
# Copyright (C) 2005 Tresys Technology, LLC
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_make_device_node(type)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_make_device_node',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
typeattribute $1 device_node;
|
|
|
|
filesystem_associate($1,optional)
|
2005-04-21 22:46:49 +00:00
|
|
|
filesystem_tmpfs_associate($1,optional)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_make_device_node_depend',`
|
|
|
|
attribute device_node;
|
|
|
|
filesystem_associate_depend
|
2005-04-21 22:46:49 +00:00
|
|
|
filesystem_tmpfs_associate_depend
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-04-28 18:59:01 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_manage_all_devices_labels(domain)
|
2005-04-28 18:59:01 +00:00
|
|
|
#
|
|
|
|
define(`devices_manage_all_devices_labels',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-28 18:59:01 +00:00
|
|
|
allow $1 device_node:dir { getattr relabelfrom };
|
|
|
|
allow $1 device_node:file { getattr relabelfrom };
|
|
|
|
allow $1 device_node:lnk_file { getattr relabelfrom };
|
|
|
|
allow $1 device_node:fifo_file { getattr relabelfrom };
|
|
|
|
allow $1 device_node:sock_file { getattr relabelfrom };
|
|
|
|
allow $1 { device_t device_node }:blk_file { getattr relabelfrom relabelto };
|
|
|
|
allow $1 { device_t device_node }:chr_file { getattr relabelfrom relabelto };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_manage_all_devices_labels_depend',`
|
|
|
|
attribute device_node;
|
|
|
|
type device_t;
|
|
|
|
class dir { getattr relabelfrom };
|
|
|
|
class file { getattr relabelfrom };
|
|
|
|
class lnk_file { getattr relabelfrom };
|
|
|
|
class fifo_file { getattr relabelfrom };
|
|
|
|
class sock_file { getattr relabelfrom };
|
|
|
|
class blk_file { getattr relabelfrom relabelto };
|
|
|
|
class chr_file { getattr relabelfrom relabelto };
|
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_list_device_nodes(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_list_device_nodes',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 device_t:dir { getattr read search };
|
|
|
|
allow $1 device_t:lnk_file { getattr read };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_list_device_nodes_depend',`
|
|
|
|
type device_t;
|
|
|
|
class dir { getattr read search };
|
|
|
|
class lnk_file { getattr read };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_ignore_list_device_nodes(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_ignore_list_device_nodes',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
dontaudit $1 device_t:dir { getattr read search };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_ignore_list_device_nodes_depend',`
|
|
|
|
type device_t;
|
|
|
|
class dir { getattr read search };
|
|
|
|
')
|
|
|
|
|
2005-05-18 13:19:51 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# devices_get_generic_block_device_attributes(domain)
|
|
|
|
#
|
|
|
|
define(`devices_get_generic_block_device_attributes',`
|
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
allow $1 device_t:dir { getattr search read };
|
|
|
|
allow $1 device_t:blk_file getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_get_generic_block_device_attributes_depend',`
|
|
|
|
type device_t;
|
|
|
|
class blk_file getattr;
|
|
|
|
')
|
2005-05-13 14:37:13 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# devices_ignore_get_generic_block_device_attributes(domain)
|
|
|
|
#
|
|
|
|
define(`devices_ignore_get_generic_block_device_attributes',`
|
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
dontaudit $1 device_t:blk_file getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_ignore_get_generic_block_device_attributes_depend',`
|
|
|
|
type device_t;
|
|
|
|
class blk_file getattr;
|
|
|
|
')
|
|
|
|
|
2005-05-18 13:19:51 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# devices_get_generic_character_device_attributes(domain)
|
|
|
|
#
|
|
|
|
define(`devices_get_generic_character_device_attributes',`
|
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
allow $1 device_t:dir { getattr search read };
|
|
|
|
allow $1 device_t:chr_file getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_get_generic_character_device_attributes_depend',`
|
|
|
|
type device_t;
|
|
|
|
class chr_file getattr;
|
|
|
|
')
|
|
|
|
|
2005-05-13 14:37:13 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# devices_ignore_get_generic_character_device_attributes(domain)
|
|
|
|
#
|
|
|
|
define(`devices_ignore_get_generic_character_device_attributes',`
|
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
dontaudit $1 device_t:chr_file getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_ignore_get_generic_character_device_attributes_depend',`
|
|
|
|
type device_t;
|
|
|
|
class chr_file getattr;
|
|
|
|
')
|
|
|
|
|
2005-05-24 15:55:57 +00:00
|
|
|
########################################
|
|
|
|
## <interface name="devices_remove_dev_symbolic_links">
|
|
|
|
## <description>
|
|
|
|
## Delete symbolic links in /dev.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="write" weight="1"/>
|
|
|
|
## </interface>
|
|
|
|
#
|
|
|
|
define(`devices_remove_dev_symbolic_links',`
|
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
allow $1 device_t:dir { getattr read write remove_name };
|
|
|
|
allow $1 device_t:lnk_file unlink;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_remove_dev_symbolic_links_depend',`
|
|
|
|
attribute device_node, memory_raw_read, memory_raw_write;
|
|
|
|
type device_t;
|
|
|
|
class dir { getattr read write remove_name };
|
|
|
|
class lnk_file unlink;
|
|
|
|
')
|
|
|
|
|
2005-05-13 14:37:13 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# devices_manage_dev_symbolic_links(domain)
|
|
|
|
#
|
|
|
|
define(`devices_manage_dev_symbolic_links',`
|
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
allow $1 device_t:dir { create read getattr lock setattr ioctl link unlink rename search add_name remove_name reparent write rmdir relabelfrom relabelto };
|
|
|
|
allow $1 device_t:lnk_file { create read getattr setattr link unlink rename };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_manage_dev_symbolic_links_depend',`
|
|
|
|
type device_t;
|
|
|
|
class dir { create read getattr lock setattr ioctl link unlink rename search add_name remove_name reparent write rmdir relabelfrom relabelto };
|
|
|
|
class lnk_file { create read getattr setattr link unlink rename };
|
|
|
|
')
|
|
|
|
|
2005-05-02 21:02:14 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_manage_device_nodes(domain)
|
2005-05-02 21:02:14 +00:00
|
|
|
#
|
|
|
|
define(`devices_manage_device_nodes',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-05-13 14:37:13 +00:00
|
|
|
allow $1 device_t:dir { create read getattr lock setattr ioctl link unlink rename search add_name remove_name reparent write rmdir relabelfrom relabelto };
|
|
|
|
allow $1 device_t:sock_file { create ioctl read getattr lock write setattr append link unlink rename };
|
|
|
|
allow $1 device_t:lnk_file { create read getattr setattr link unlink rename };
|
|
|
|
allow $1 device_t:{ chr_file blk_file } { create ioctl read getattr lock write setattr append link unlink rename relabelfrom relabelto };
|
|
|
|
allow $1 device_node:{ chr_file blk_file } { create ioctl read getattr lock write setattr append link unlink rename relabelfrom relabelto };
|
2005-05-02 21:02: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;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_manage_device_nodes_depend',`
|
|
|
|
attribute device_node, memory_raw_read, memory_raw_write;
|
|
|
|
type device_t;
|
|
|
|
class dir { create read getattr lock setattr ioctl link unlink rename search add_name remove_name reparent write rmdir relabelfrom relabelto };
|
|
|
|
class sock_file { create ioctl read getattr lock write setattr append link unlink rename };
|
|
|
|
class lnk_file { create read getattr setattr link unlink rename };
|
|
|
|
class chr_file { create ioctl read getattr lock write setattr append link unlink rename relabelfrom relabelto };
|
|
|
|
class blk_file { create ioctl read getattr lock write setattr append link unlink rename relabelfrom relabelto };
|
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_ignore_modify_generic_devices(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_ignore_modify_generic_devices',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
dontaudit $1 device_t:{ chr_file blk_file } { getattr read write ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_ignore_modify_generic_devices_depend',`
|
|
|
|
type device_t;
|
|
|
|
class chr_file { getattr read write ioctl };
|
|
|
|
class blk_file { getattr read write ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_create_dev_entry(domain,file,objectclass(es))
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_create_dev_entry',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 device_t:dir { getattr search read write add_name remove_name };
|
|
|
|
type_transition $1 device_t:$3 $2;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_set_dev_entry_depend',`
|
|
|
|
type device_t;
|
|
|
|
class dir { getattr search read write add_name remove_name };
|
|
|
|
')
|
|
|
|
|
2005-04-22 19:31:32 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_get_all_block_device_attributes(domain)
|
2005-04-22 19:31:32 +00:00
|
|
|
#
|
|
|
|
define(`devices_get_all_block_device_attributes',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-05-13 14:37:13 +00:00
|
|
|
allow $1 device_t:dir { getattr read search };
|
2005-04-22 19:31:32 +00:00
|
|
|
allow $1 device_node:blk_file getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_get_all_block_device_attributes_depend',`
|
|
|
|
attribute device_node;
|
|
|
|
class blk_file getattr;
|
2005-05-13 14:37:13 +00:00
|
|
|
class dir { getattr read search };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# devices_ignore_get_all_block_device_attributes(domain)
|
|
|
|
#
|
|
|
|
define(`devices_ignore_get_all_block_device_attributes',`
|
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
allow $1 device_node:blk_file getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_ignore_get_all_block_device_attributes_depend',`
|
|
|
|
attribute device_node;
|
|
|
|
class blk_file getattr;
|
2005-04-22 19:31:32 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_get_all_character_device_attributes(domain)
|
2005-04-22 19:31:32 +00:00
|
|
|
#
|
|
|
|
define(`devices_get_all_character_device_attributes',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-05-13 14:37:13 +00:00
|
|
|
allow $1 device_t:dir { getattr read search };
|
2005-04-22 19:31:32 +00:00
|
|
|
allow $1 device_node:chr_file getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_get_all_character_device_attributes_depend',`
|
|
|
|
attribute device_node;
|
|
|
|
class chr_file getattr;
|
2005-05-13 14:37:13 +00:00
|
|
|
class dir { getattr read search };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# devices_ignore_get_all_character_device_attributes(domain)
|
|
|
|
#
|
|
|
|
define(`devices_ignore_get_all_character_device_attributes',`
|
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
dontaudit $1 device_node:chr_file getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_ignore_get_all_character_device_attributes_depend',`
|
|
|
|
attribute device_node;
|
|
|
|
class chr_file getattr;
|
2005-04-22 19:31:32 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_set_all_block_device_attributes(domain)
|
2005-04-22 19:31:32 +00:00
|
|
|
#
|
|
|
|
define(`devices_set_all_block_device_attributes',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-22 19:31:32 +00:00
|
|
|
allow $1 device_node:blk_file setattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_set_all_block_device_attributes_depend',`
|
|
|
|
attribute device_node;
|
|
|
|
class blk_file setattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_set_all_character_device_attributes(domain)
|
2005-04-22 19:31:32 +00:00
|
|
|
#
|
|
|
|
define(`devices_set_all_character_device_attributes',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-22 19:31:32 +00:00
|
|
|
allow $1 device_node:chr_file setattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_set_all_character_device_attributes_depend',`
|
|
|
|
attribute device_node;
|
|
|
|
class chr_file setattr;
|
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_raw_read_memory(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_raw_read_memory',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
typeattribute $1 memory_raw_read;
|
|
|
|
allow $1 device_t:dir { getattr read search };
|
|
|
|
allow $1 memory_device_t:chr_file { getattr read ioctl };
|
2005-04-19 20:47:29 +00:00
|
|
|
allow $1 self:capability sys_rawio;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_raw_read_memory_depend',`
|
|
|
|
type device_t, memory_device_t;
|
|
|
|
attribute memory_raw_read;
|
|
|
|
class dir { getattr read search };
|
|
|
|
class chr_file { getattr read ioctl };
|
2005-04-19 20:47:29 +00:00
|
|
|
class capability sys_rawio;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_raw_write_memory(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_raw_write_memory',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
typeattribute $1 memory_raw_write
|
|
|
|
allow $1 device_t:dir { getattr read search };
|
|
|
|
allow $1 memory_device_t:chr_file write;
|
2005-04-19 20:47:29 +00:00
|
|
|
allow $1 self:capability sys_rawio;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_raw_write_memory_depend',`
|
|
|
|
type device_t, memory_device_t;
|
|
|
|
attribute memory_raw_write;
|
|
|
|
class dir { getattr read search };
|
|
|
|
class chr_file write;
|
2005-04-19 20:47:29 +00:00
|
|
|
class capability sys_rawio;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_get_random_data(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_get_random_data',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 device_t:dir { getattr read search };
|
|
|
|
allow $1 random_device_t:chr_file { getattr read ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_get_random_data_depend',`
|
|
|
|
type device_t, random_device_t;
|
|
|
|
class dir { getattr read search };
|
|
|
|
class chr_file { getattr read ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_get_pseudorandom_data(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_get_pseudorandom_data',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 device_t:dir { getattr read search };
|
|
|
|
allow $1 urandom_device_t:chr_file { getattr read ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_get_pseudorandom_data_depend',`
|
|
|
|
type device_t, urandom_device_t;
|
|
|
|
class dir { getattr read search };
|
|
|
|
class chr_file { getattr read ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_add_entropy(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_add_entropy',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 device_t:dir { getattr read search };
|
|
|
|
allow $1 random_device_t:chr_file { getattr write ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_add_entropy_depend',`
|
|
|
|
type device_t, random_device_t;
|
|
|
|
class dir { getattr read search };
|
|
|
|
class chr_file { getattr write ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_set_pseudorandom_seed(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_set_pseudorandom_seed',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 device_t:dir { getattr read search };
|
|
|
|
allow $1 urandom_device_t:chr_file { getattr write ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_set_pseudorandom_seed_depend',`
|
|
|
|
type device_t, urandom_device_t;
|
|
|
|
class dir { getattr read search };
|
|
|
|
class chr_file { getattr write ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-09 19:55:01 +00:00
|
|
|
# devices_use_dev_null(domain)
|
|
|
|
#
|
|
|
|
define(`devices_use_dev_null',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 device_t:dir { getattr read search };
|
2005-05-25 20:58:21 +00:00
|
|
|
allow $1 null_device_t:chr_file { getattr read write append ioctl };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-25 20:58:21 +00:00
|
|
|
define(`devices_use_dev_null_depend',`
|
|
|
|
type device_t, null_device_t;
|
2005-04-14 20:18:17 +00:00
|
|
|
class device_t:dir { getattr read search };
|
2005-05-25 20:58:21 +00:00
|
|
|
class chr_file { getattr read write append ioctl };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-09 19:55:01 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-25 20:58:21 +00:00
|
|
|
# devices_use_dev_zero(domain)
|
2005-05-09 19:55:01 +00:00
|
|
|
#
|
2005-05-25 20:58:21 +00:00
|
|
|
define(`devices_use_dev_zero',`
|
2005-05-09 19:55:01 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
allow $1 device_t:dir { getattr read search };
|
2005-05-25 20:58:21 +00:00
|
|
|
allow $1 zero_device_t:chr_file { getattr read write append ioctl };
|
2005-05-09 19:55:01 +00:00
|
|
|
')
|
|
|
|
|
2005-05-25 20:58:21 +00:00
|
|
|
define(`devices_use_dev_zero_depend',`
|
2005-05-09 19:55:01 +00:00
|
|
|
type device_t, zero_device_t;
|
|
|
|
class device_t:dir { getattr read search };
|
2005-05-25 20:58:21 +00:00
|
|
|
class chr_file { getattr read write append ioctl };
|
2005-05-09 19:55:01 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_read_realtime_clock(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_read_realtime_clock',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 device_t:dir { getattr read search };
|
|
|
|
allow $1 clock_device_t:chr_file { getattr read ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_read_realtime_clock_depend',`
|
|
|
|
type device_t, clock_device_t;
|
|
|
|
class dir { getattr read search };
|
|
|
|
class chr_file { getattr read ioctl };
|
|
|
|
')
|
|
|
|
|
2005-05-05 21:19:18 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# devices_write_realtime_clock(domain)
|
|
|
|
#
|
|
|
|
define(`devices_write_realtime_clock',`
|
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
allow $1 device_t:dir { getattr read search };
|
|
|
|
allow $1 clock_device_t:chr_file { setattr lock write append ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_write_realtime_clock_depend',`
|
|
|
|
type device_t, clock_device_t;
|
|
|
|
class dir { getattr read search };
|
|
|
|
class chr_file { setattr lock write append ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# devices_modify_realtime_clock(domain)
|
|
|
|
#
|
|
|
|
define(`devices_modify_realtime_clock',`
|
|
|
|
devices_read_realtime_clock($1)
|
|
|
|
devices_write_realtime_clock($1)
|
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_record_sound_input(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_record_sound_input',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 device_t:dir { getattr read search };
|
|
|
|
allow $1 sound_device_t:chr_file { getattr read ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_record_sound_input_depend',`
|
|
|
|
type device_t, sound_device_t;
|
|
|
|
class dir { getattr read search };
|
|
|
|
class chr_file { getattr read ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_play_sound(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_play_sound',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 device_t:dir { getattr read search };
|
|
|
|
allow $1 sound_device_t:chr_file { getattr write ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_play_sound_depend',`
|
|
|
|
type device_t, sound_device_t;
|
|
|
|
class dir { getattr read search };
|
|
|
|
class chr_file { getattr write ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_read_sound_mixer_levels(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_read_sound_mixer_levels',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 device_t:dir { getattr read search };
|
|
|
|
allow $1 sound_device_t:chr_file { getattr read ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_read_sound_mixer_levels_depend',`
|
|
|
|
type device_t, sound_device_t;
|
|
|
|
class dir { getattr read search };
|
|
|
|
class chr_file { getattr read ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_write_sound_mixer_levels(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_write_sound_mixer_levels',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 device_t:dir { getattr read search };
|
|
|
|
allow $1 sound_device_t:chr_file { getattr write ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_write_sound_mixer_levels_depend',`
|
|
|
|
type device_t, sound_device_t;
|
|
|
|
class dir { getattr read search };
|
|
|
|
class chr_file { getattr write ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_direct_agp_access(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_direct_agp_access',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 device_t:dir { getattr read search };
|
|
|
|
allow $1 agp_device_t:chr_file { getattr read write ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_direct_agp_access_depend',`
|
|
|
|
type device_t, agp_device_t;
|
|
|
|
class dir { getattr read search };
|
|
|
|
class chr_file { getattr read write ioctl };
|
|
|
|
')
|
|
|
|
|
2005-05-16 21:10:33 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# devices_get_direct_rendering_interface_attributes(domain)
|
|
|
|
#
|
|
|
|
define(`devices_get_direct_rendering_interface_attributes',`
|
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
allow $1 device_t:dir { getattr read search };
|
|
|
|
allow $1 dri_device_t:chr_file getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_get_direct_rendering_interface_attributes_depend',`
|
|
|
|
type device_t, dri_device_t;
|
|
|
|
class dir { getattr read search };
|
|
|
|
class chr_file getattr;
|
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_use_direct_rendering_interface(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_use_direct_rendering_interface',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 device_t:dir { getattr read search };
|
2005-05-16 21:10:33 +00:00
|
|
|
allow $1 dri_device_t:chr_file { getattr read write ioctl };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_use_direct_rendering_interface_depend',`
|
|
|
|
type device_t, dri_device_t;
|
|
|
|
class dir { getattr read search };
|
|
|
|
class chr_file { getattr read write ioctl };
|
|
|
|
')
|
|
|
|
|
2005-05-16 21:10:33 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# devices_ignore_use_direct_rendering_interface(domain)
|
|
|
|
#
|
|
|
|
define(`devices_ignore_use_direct_rendering_interface',`
|
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
dontaudit $1 dri_device_t:chr_file { getattr read write ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_ignore_use_direct_rendering_interface_depend',`
|
|
|
|
type dri_device_t;
|
|
|
|
class chr_file { getattr read write ioctl };
|
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_read_mtrr(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_read_mtrr',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 device_t:dir { getattr read search };
|
|
|
|
allow $1 mtrr_device_t:chr_file { getattr read ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_read_mtrr_depend',`
|
|
|
|
type device_t, mtrr_device_t;
|
|
|
|
class dir { getattr read search };
|
|
|
|
class chr_file { getattr read ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_write_mtrr(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_write_mtrr',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 device_t:dir { getattr read search };
|
|
|
|
allow $1 mtrr_device_t:chr_file { getattr write ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_write_mtrr_depend',`
|
|
|
|
type device_t, mtrr_device_t;
|
|
|
|
class chr_file { getattr write ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_read_framebuffer(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_read_framebuffer',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 device_t:dir { getattr read search };
|
|
|
|
allow $1 framebuf_device_t:chr_file { getattr read ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_read_framebuffer_depend',`
|
|
|
|
type framebuf_device_t;
|
|
|
|
class dir { getattr read search };
|
|
|
|
class chr_file { getattr read ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_write_framebuffer(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_write_framebuffer',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 device_t:dir { getattr read search };
|
|
|
|
allow $1 framebuf_device_t:chr_file { getattr write ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_write_framebuffer_depend',`
|
|
|
|
type device_t, framebuf_device_t;
|
|
|
|
class dir { getattr read search };
|
|
|
|
class chr_file { getattr write ioctl };
|
|
|
|
')
|
|
|
|
|
2005-05-13 14:37:13 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# devices_use_lvm_control_channel(domain)
|
|
|
|
#
|
|
|
|
define(`devices_use_lvm_control_channel',`
|
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
allow $1 lvm_control_t:chr_file { ioctl read getattr lock write append };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_use_lvm_control_channel_depend',`
|
|
|
|
type lvm_control_t;
|
|
|
|
class chr_file { ioctl read getattr lock write append };
|
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_read_misc(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_read_misc',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 device_t:dir { getattr read search };
|
|
|
|
allow $1 misc_device_t:chr_file { getattr read ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_read_misc_depend',`
|
|
|
|
type device_t, misc_device_t;
|
|
|
|
class dir { getattr read search };
|
|
|
|
class chr_file { getattr read ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_write_misc(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_write_misc',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 device_t:dir { getattr read search };
|
|
|
|
allow $1 misc_device_t:chr_file { getattr write ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_write_misc_depend',`
|
|
|
|
type device_t, misc_device_t;
|
|
|
|
class dir { getattr read search };
|
|
|
|
class chr_file { getattr write ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_get_mouse_input(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_get_mouse_input',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 device_t:dir { getattr read search };
|
|
|
|
allow $1 mouse_device_t:chr_file { getattr read ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_get_mouse_input_depend',`
|
|
|
|
type device_t, mouse_device_t;
|
|
|
|
allow $1 device_t:dir { getattr read search };
|
|
|
|
class chr_file { getattr read ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_get_input_event(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_get_input_event',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 device_t:dir { getattr read search };
|
|
|
|
allow $1 event_device_t:chr_file { getattr read ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_get_input_event_depend',`
|
|
|
|
type device_t, event_device_t;
|
|
|
|
class dir { getattr read search };
|
|
|
|
class chr_file { getattr read ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_get_cpuid(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_get_cpuid',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 device_t:dir { getattr read search };
|
|
|
|
allow $1 cpu_device_t:chr_file { getattr read ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_get_cpuid_depend',`
|
|
|
|
type device_t, cpu_device_t;
|
|
|
|
class dir { getattr read search };
|
|
|
|
class chr_file { getattr read ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_load_cpu_microcode(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_load_cpu_microcode',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 device_t:dir { getattr read search };
|
|
|
|
allow $1 cpu_device_t:chr_file { getattr read write ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_load_cpu_microcode_depend',`
|
|
|
|
type device_t, cpu_device_t;
|
|
|
|
class dir { getattr read search };
|
|
|
|
class chr_file { getattr read write ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_use_scanner(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_use_scanner',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 device_t:dir { getattr read search };
|
|
|
|
allow $1 scanner_device_t:chr_file { getattr read write ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_use_scanner_depend',`
|
|
|
|
type device_t, scanner_device_t;
|
|
|
|
class dir { getattr read search };
|
|
|
|
class chr_file { getattr read write ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# devices_control_system_powermanagement(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`devices_control_system_powermanagement',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 device_t:dir { getattr read search };
|
|
|
|
allow $1 power_device_t:chr_file { getattr read write ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`devices_control_system_powermanagement_depend',`
|
|
|
|
type device_t, power_device_t;
|
|
|
|
class dir { getattr read search };
|
|
|
|
class chr_file { getattr read write ioctl };
|
|
|
|
')
|