Chris PeBenito e181fe
# Copyright (C) 2005 Tresys Technology, LLC
Chris PeBenito e181fe
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# devices_make_device_node(type)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_make_device_node',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
typeattribute $1 device_node;
Chris PeBenito b4cd15
filesystem_associate($1,optional)
Chris PeBenito 33bc0d
filesystem_tmpfs_associate($1,optional)
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_make_device_node_depend',`
Chris PeBenito b4cd15
attribute device_node;
Chris PeBenito b4cd15
filesystem_associate_depend
Chris PeBenito 33bc0d
filesystem_tmpfs_associate_depend
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# devices_manage_all_devices_labels(domain)
Chris PeBenito ee5772
#
Chris PeBenito ee5772
define(`devices_manage_all_devices_labels',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito ee5772
allow $1 device_node:dir { getattr relabelfrom };
Chris PeBenito ee5772
allow $1 device_node:file { getattr relabelfrom };
Chris PeBenito ee5772
allow $1 device_node:lnk_file { getattr relabelfrom };
Chris PeBenito ee5772
allow $1 device_node:fifo_file { getattr relabelfrom };
Chris PeBenito ee5772
allow $1 device_node:sock_file { getattr relabelfrom };
Chris PeBenito ee5772
allow $1 { device_t device_node }:blk_file { getattr relabelfrom relabelto };
Chris PeBenito ee5772
allow $1 { device_t device_node }:chr_file { getattr relabelfrom relabelto };
Chris PeBenito ee5772
')
Chris PeBenito ee5772
Chris PeBenito ee5772
define(`devices_manage_all_devices_labels_depend',`
Chris PeBenito ee5772
attribute device_node;
Chris PeBenito ee5772
type device_t;
Chris PeBenito ee5772
class dir { getattr relabelfrom };
Chris PeBenito ee5772
class file { getattr relabelfrom };
Chris PeBenito ee5772
class lnk_file { getattr relabelfrom };
Chris PeBenito ee5772
class fifo_file { getattr relabelfrom };
Chris PeBenito ee5772
class sock_file { getattr relabelfrom };
Chris PeBenito ee5772
class blk_file { getattr relabelfrom relabelto };
Chris PeBenito ee5772
class chr_file { getattr relabelfrom relabelto };
Chris PeBenito ee5772
')
Chris PeBenito ee5772
Chris PeBenito ee5772
########################################
Chris PeBenito ee5772
#
Chris PeBenito bd202f
# devices_list_device_nodes(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_list_device_nodes',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr read search };
Chris PeBenito b4cd15
allow $1 device_t:lnk_file { getattr read };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_list_device_nodes_depend',`
Chris PeBenito b4cd15
type device_t;
Chris PeBenito b4cd15
class dir { getattr read search };
Chris PeBenito b4cd15
class lnk_file { getattr read };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# devices_ignore_list_device_nodes(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_ignore_list_device_nodes',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
dontaudit $1 device_t:dir { getattr read search };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_ignore_list_device_nodes_depend',`
Chris PeBenito b4cd15
type device_t;
Chris PeBenito b4cd15
class dir { getattr read search };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# devices_manage_device_nodes(domain)
Chris PeBenito 07d6e3
#
Chris PeBenito 07d6e3
define(`devices_manage_device_nodes',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 07d6e3
allow udev_t device_t:dir { create read getattr lock setattr ioctl link unlink rename search add_name remove_name reparent write rmdir relabelfrom relabelto };
Chris PeBenito 07d6e3
allow udev_t device_t:sock_file { create ioctl read getattr lock write setattr append link unlink rename };
Chris PeBenito 07d6e3
allow udev_t device_t:lnk_file { create read getattr setattr link unlink rename };
Chris PeBenito 07d6e3
allow udev_t device_t:{ chr_file blk_file } { create ioctl read getattr lock write setattr append link unlink rename relabelfrom relabelto };
Chris PeBenito 07d6e3
allow udev_t device_node:{ chr_file blk_file } { create ioctl read getattr lock write setattr append link unlink rename relabelfrom relabelto };
Chris PeBenito 07d6e3
# these next rules are to satisfy assertions broken by the above lines.
Chris PeBenito 07d6e3
# the permissions hopefully can be cut back a lot
Chris PeBenito 07d6e3
storage_raw_read_fixed_disk($1)
Chris PeBenito 07d6e3
storage_raw_write_fixed_disk($1)
Chris PeBenito 07d6e3
storage_read_scsi_generic($1)
Chris PeBenito 07d6e3
storage_write_scsi_generic($1)
Chris PeBenito 07d6e3
typeattribute $1 memory_raw_read;
Chris PeBenito 07d6e3
typeattribute $1 memory_raw_write;
Chris PeBenito 07d6e3
')
Chris PeBenito 07d6e3
Chris PeBenito 07d6e3
define(`devices_manage_device_nodes_depend',`
Chris PeBenito 07d6e3
attribute device_node, memory_raw_read, memory_raw_write;
Chris PeBenito 07d6e3
type device_t;
Chris PeBenito 07d6e3
class dir { create read getattr lock setattr ioctl link unlink rename search add_name remove_name reparent write rmdir relabelfrom relabelto };
Chris PeBenito 07d6e3
class sock_file { create ioctl read getattr lock write setattr append link unlink rename };
Chris PeBenito 07d6e3
class lnk_file { create read getattr setattr link unlink rename };
Chris PeBenito 07d6e3
class chr_file { create ioctl read getattr lock write setattr append link unlink rename relabelfrom relabelto };
Chris PeBenito 07d6e3
class blk_file { create ioctl read getattr lock write setattr append link unlink rename relabelfrom relabelto };
Chris PeBenito 07d6e3
')
Chris PeBenito 07d6e3
Chris PeBenito 07d6e3
########################################
Chris PeBenito 07d6e3
#
Chris PeBenito bd202f
# devices_ignore_modify_generic_devices(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_ignore_modify_generic_devices',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
dontaudit $1 device_t:{ chr_file blk_file } { getattr read write ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_ignore_modify_generic_devices_depend',`
Chris PeBenito b4cd15
type device_t;
Chris PeBenito b4cd15
class chr_file { getattr read write ioctl };
Chris PeBenito b4cd15
class blk_file { getattr read write ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# devices_create_dev_entry(domain,file,objectclass(es))
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_create_dev_entry',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr search read write add_name remove_name };
Chris PeBenito b4cd15
type_transition $1 device_t:$3 $2;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_set_dev_entry_depend',`
Chris PeBenito b4cd15
type device_t;
Chris PeBenito b4cd15
class dir { getattr search read write add_name remove_name };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# devices_get_all_block_device_attributes(domain)
Chris PeBenito 8a0da1
#
Chris PeBenito 8a0da1
define(`devices_get_all_block_device_attributes',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 8a0da1
allow $1 device_node:blk_file getattr;
Chris PeBenito 8a0da1
')
Chris PeBenito 8a0da1
Chris PeBenito 8a0da1
define(`devices_get_all_block_device_attributes_depend',`
Chris PeBenito 8a0da1
attribute device_node;
Chris PeBenito 8a0da1
class blk_file getattr;
Chris PeBenito 8a0da1
')
Chris PeBenito 8a0da1
Chris PeBenito 8a0da1
########################################
Chris PeBenito 8a0da1
#
Chris PeBenito bd202f
# devices_get_all_character_device_attributes(domain)
Chris PeBenito 8a0da1
#
Chris PeBenito 8a0da1
define(`devices_get_all_character_device_attributes',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 8a0da1
allow $1 device_node:chr_file getattr;
Chris PeBenito 8a0da1
')
Chris PeBenito 8a0da1
Chris PeBenito 8a0da1
define(`devices_get_all_character_device_attributes_depend',`
Chris PeBenito 8a0da1
attribute device_node;
Chris PeBenito 8a0da1
class chr_file getattr;
Chris PeBenito 8a0da1
')
Chris PeBenito 8a0da1
Chris PeBenito 8a0da1
########################################
Chris PeBenito 8a0da1
#
Chris PeBenito bd202f
# devices_set_all_block_device_attributes(domain)
Chris PeBenito 8a0da1
#
Chris PeBenito 8a0da1
define(`devices_set_all_block_device_attributes',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 8a0da1
allow $1 device_node:blk_file setattr;
Chris PeBenito 8a0da1
')
Chris PeBenito 8a0da1
Chris PeBenito 8a0da1
define(`devices_set_all_block_device_attributes_depend',`
Chris PeBenito 8a0da1
attribute device_node;
Chris PeBenito 8a0da1
class blk_file setattr;
Chris PeBenito 8a0da1
')
Chris PeBenito 8a0da1
Chris PeBenito 8a0da1
########################################
Chris PeBenito 8a0da1
#
Chris PeBenito bd202f
# devices_set_all_character_device_attributes(domain)
Chris PeBenito 8a0da1
#
Chris PeBenito 8a0da1
define(`devices_set_all_character_device_attributes',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 8a0da1
allow $1 device_node:chr_file setattr;
Chris PeBenito 8a0da1
')
Chris PeBenito 8a0da1
Chris PeBenito 8a0da1
define(`devices_set_all_character_device_attributes_depend',`
Chris PeBenito 8a0da1
attribute device_node;
Chris PeBenito 8a0da1
class chr_file setattr;
Chris PeBenito 8a0da1
')
Chris PeBenito 8a0da1
Chris PeBenito 8a0da1
########################################
Chris PeBenito 8a0da1
#
Chris PeBenito bd202f
# devices_raw_read_memory(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_raw_read_memory',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
typeattribute $1 memory_raw_read;
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr read search };
Chris PeBenito b4cd15
allow $1 memory_device_t:chr_file { getattr read ioctl };
Chris PeBenito f0872d
allow $1 self:capability sys_rawio;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_raw_read_memory_depend',`
Chris PeBenito b4cd15
type device_t, memory_device_t;
Chris PeBenito b4cd15
attribute memory_raw_read;
Chris PeBenito b4cd15
class dir { getattr read search };
Chris PeBenito b4cd15
class chr_file { getattr read ioctl };
Chris PeBenito f0872d
class capability sys_rawio;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# devices_raw_write_memory(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_raw_write_memory',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
typeattribute $1 memory_raw_write
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr read search };
Chris PeBenito b4cd15
allow $1 memory_device_t:chr_file write;
Chris PeBenito f0872d
allow $1 self:capability sys_rawio;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_raw_write_memory_depend',`
Chris PeBenito b4cd15
type device_t, memory_device_t;
Chris PeBenito b4cd15
attribute memory_raw_write;
Chris PeBenito b4cd15
class dir { getattr read search };
Chris PeBenito b4cd15
class chr_file write;
Chris PeBenito f0872d
class capability sys_rawio;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# devices_get_random_data(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_get_random_data',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr read search };
Chris PeBenito b4cd15
allow $1 random_device_t:chr_file { getattr read ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_get_random_data_depend',`
Chris PeBenito b4cd15
type device_t, random_device_t;
Chris PeBenito b4cd15
class dir { getattr read search };
Chris PeBenito b4cd15
class chr_file { getattr read ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# devices_get_pseudorandom_data(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_get_pseudorandom_data',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr read search };
Chris PeBenito b4cd15
allow $1 urandom_device_t:chr_file { getattr read ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_get_pseudorandom_data_depend',`
Chris PeBenito b4cd15
type device_t, urandom_device_t;
Chris PeBenito b4cd15
class dir { getattr read search };
Chris PeBenito b4cd15
class chr_file { getattr read ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# devices_add_entropy(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_add_entropy',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr read search };
Chris PeBenito b4cd15
allow $1 random_device_t:chr_file { getattr write ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_add_entropy_depend',`
Chris PeBenito b4cd15
type device_t, random_device_t;
Chris PeBenito b4cd15
class dir { getattr read search };
Chris PeBenito b4cd15
class chr_file { getattr write ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# devices_set_pseudorandom_seed(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_set_pseudorandom_seed',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr read search };
Chris PeBenito b4cd15
allow $1 urandom_device_t:chr_file { getattr write ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_set_pseudorandom_seed_depend',`
Chris PeBenito b4cd15
type device_t, urandom_device_t;
Chris PeBenito b4cd15
class dir { getattr read search };
Chris PeBenito b4cd15
class chr_file { getattr write ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito a9a20d
# devices_read_dev_null(domain)
Chris PeBenito b4cd15
#
Chris PeBenito a9a20d
define(`devices_read_dev_null',`
Chris PeBenito a9a20d
requires_block_template(`$0'_depend)
Chris PeBenito a9a20d
allow $1 device_t:dir { getattr read search };
Chris PeBenito a9a20d
allow $1 null_device_t:chr_file { getattr read };
Chris PeBenito a9a20d
')
Chris PeBenito a9a20d
Chris PeBenito a9a20d
define(`devices_read_dev_null_depend',`
Chris PeBenito a9a20d
type device_t, null_device_t;
Chris PeBenito a9a20d
class device_t:dir { getattr read search };
Chris PeBenito a9a20d
class chr_file { getattr read };
Chris PeBenito a9a20d
')
Chris PeBenito a9a20d
Chris PeBenito a9a20d
########################################
Chris PeBenito a9a20d
#
Chris PeBenito a9a20d
# devices_write_dev_null(domain)
Chris PeBenito a9a20d
#
Chris PeBenito a9a20d
define(`devices_write_dev_null',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr read search };
Chris PeBenito 5eafc3
allow $1 null_device_t:chr_file { getattr append write };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito a9a20d
define(`devices_write_dev_null_depend',`
Chris PeBenito b4cd15
type device_t, null_device_t;
Chris PeBenito b4cd15
class device_t:dir { getattr read search };
Chris PeBenito 5eafc3
class chr_file { getattr append write };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito a9a20d
# devices_use_dev_null(domain)
Chris PeBenito a9a20d
#
Chris PeBenito a9a20d
define(`devices_use_dev_null',`
Chris PeBenito a9a20d
devices_read_dev_null($1)
Chris PeBenito a9a20d
devices_write_dev_null($1)
Chris PeBenito a9a20d
')
Chris PeBenito a9a20d
Chris PeBenito a9a20d
########################################
Chris PeBenito a9a20d
#
Chris PeBenito a9a20d
# devices_read_dev_zero(domain)
Chris PeBenito b4cd15
#
Chris PeBenito a9a20d
define(`devices_read_dev_zero',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr read search };
Chris PeBenito b4cd15
allow $1 zero_device_t:chr_file { getattr read };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito a9a20d
define(`devices_read_dev_zero_depend',`
Chris PeBenito b4cd15
type device_t, zero_device_t;
Chris PeBenito b4cd15
class device_t:dir { getattr read search };
Chris PeBenito b4cd15
class chr_file { getattr read };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito a9a20d
# devices_write_dev_zero(domain)
Chris PeBenito a9a20d
#
Chris PeBenito a9a20d
define(`devices_write_dev_zero',`
Chris PeBenito a9a20d
requires_block_template(`$0'_depend)
Chris PeBenito a9a20d
allow $1 device_t:dir { getattr read search };
Chris PeBenito a9a20d
allow $1 zero_device_t:chr_file { getattr append write };
Chris PeBenito a9a20d
')
Chris PeBenito a9a20d
Chris PeBenito a9a20d
define(`devices_write_dev_zero_depend',`
Chris PeBenito a9a20d
type device_t, zero_device_t;
Chris PeBenito a9a20d
class device_t:dir { getattr read search };
Chris PeBenito a9a20d
class chr_file { getattr append write };
Chris PeBenito a9a20d
')
Chris PeBenito a9a20d
Chris PeBenito a9a20d
########################################
Chris PeBenito a9a20d
#
Chris PeBenito a9a20d
# devices_use_dev_zero(domain)
Chris PeBenito a9a20d
#
Chris PeBenito a9a20d
define(`devices_use_dev_zero',`
Chris PeBenito a9a20d
devices_read_dev_zero($1)
Chris PeBenito a9a20d
devices_write_dev_zero($1)
Chris PeBenito a9a20d
')
Chris PeBenito a9a20d
Chris PeBenito a9a20d
########################################
Chris PeBenito a9a20d
#
Chris PeBenito bd202f
# devices_read_realtime_clock(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_read_realtime_clock',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr read search };
Chris PeBenito b4cd15
allow $1 clock_device_t:chr_file { getattr read ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_read_realtime_clock_depend',`
Chris PeBenito b4cd15
type device_t, clock_device_t;
Chris PeBenito b4cd15
class dir { getattr read search };
Chris PeBenito b4cd15
class chr_file { getattr read ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito 44a43b
# devices_write_realtime_clock(domain)
Chris PeBenito 44a43b
#
Chris PeBenito 44a43b
define(`devices_write_realtime_clock',`
Chris PeBenito 44a43b
requires_block_template(`$0'_depend)
Chris PeBenito 44a43b
allow $1 device_t:dir { getattr read search };
Chris PeBenito 44a43b
allow $1 clock_device_t:chr_file { setattr lock write append ioctl };
Chris PeBenito 44a43b
')
Chris PeBenito 44a43b
Chris PeBenito 44a43b
define(`devices_write_realtime_clock_depend',`
Chris PeBenito 44a43b
type device_t, clock_device_t;
Chris PeBenito 44a43b
class dir { getattr read search };
Chris PeBenito 44a43b
class chr_file { setattr lock write append ioctl };
Chris PeBenito 44a43b
')
Chris PeBenito 44a43b
Chris PeBenito 44a43b
########################################
Chris PeBenito 44a43b
#
Chris PeBenito 44a43b
# devices_modify_realtime_clock(domain)
Chris PeBenito 44a43b
#
Chris PeBenito 44a43b
define(`devices_modify_realtime_clock',`
Chris PeBenito 44a43b
devices_read_realtime_clock($1)
Chris PeBenito 44a43b
devices_write_realtime_clock($1)
Chris PeBenito 44a43b
')
Chris PeBenito 44a43b
Chris PeBenito 44a43b
########################################
Chris PeBenito 44a43b
#
Chris PeBenito bd202f
# devices_record_sound_input(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_record_sound_input',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr read search };
Chris PeBenito b4cd15
allow $1 sound_device_t:chr_file { getattr read ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_record_sound_input_depend',`
Chris PeBenito b4cd15
type device_t, sound_device_t;
Chris PeBenito b4cd15
class dir { getattr read search };
Chris PeBenito b4cd15
class chr_file { getattr read ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# devices_play_sound(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_play_sound',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr read search };
Chris PeBenito b4cd15
allow $1 sound_device_t:chr_file { getattr write ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_play_sound_depend',`
Chris PeBenito b4cd15
type device_t, sound_device_t;
Chris PeBenito b4cd15
class dir { getattr read search };
Chris PeBenito b4cd15
class chr_file { getattr write ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# devices_read_sound_mixer_levels(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_read_sound_mixer_levels',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr read search };
Chris PeBenito b4cd15
allow $1 sound_device_t:chr_file { getattr read ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_read_sound_mixer_levels_depend',`
Chris PeBenito b4cd15
type device_t, sound_device_t;
Chris PeBenito b4cd15
class dir { getattr read search };
Chris PeBenito b4cd15
class chr_file { getattr read ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# devices_write_sound_mixer_levels(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_write_sound_mixer_levels',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr read search };
Chris PeBenito b4cd15
allow $1 sound_device_t:chr_file { getattr write ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_write_sound_mixer_levels_depend',`
Chris PeBenito b4cd15
type device_t, sound_device_t;
Chris PeBenito b4cd15
class dir { getattr read search };
Chris PeBenito b4cd15
class chr_file { getattr write ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# devices_direct_agp_access(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_direct_agp_access',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr read search };
Chris PeBenito b4cd15
allow $1 agp_device_t:chr_file { getattr read write ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_direct_agp_access_depend',`
Chris PeBenito b4cd15
type device_t, agp_device_t;
Chris PeBenito b4cd15
class dir { getattr read search };
Chris PeBenito b4cd15
class chr_file { getattr read write ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# devices_use_direct_rendering_interface(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_use_direct_rendering_interface',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr read search };
Chris PeBenito b4cd15
allow $1 dri_device_t:chr_file { getattr read ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_use_direct_rendering_interface_depend',`
Chris PeBenito b4cd15
type device_t, dri_device_t;
Chris PeBenito b4cd15
class dir { getattr read search };
Chris PeBenito b4cd15
class chr_file { getattr read write ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# devices_read_mtrr(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_read_mtrr',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr read search };
Chris PeBenito b4cd15
allow $1 mtrr_device_t:chr_file { getattr read ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_read_mtrr_depend',`
Chris PeBenito b4cd15
type device_t, mtrr_device_t;
Chris PeBenito b4cd15
class dir { getattr read search };
Chris PeBenito b4cd15
class chr_file { getattr read ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# devices_write_mtrr(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_write_mtrr',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr read search };
Chris PeBenito b4cd15
allow $1 mtrr_device_t:chr_file { getattr write ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_write_mtrr_depend',`
Chris PeBenito b4cd15
type device_t, mtrr_device_t;
Chris PeBenito b4cd15
class chr_file { getattr write ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# devices_read_framebuffer(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_read_framebuffer',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr read search };
Chris PeBenito b4cd15
allow $1 framebuf_device_t:chr_file { getattr read ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_read_framebuffer_depend',`
Chris PeBenito b4cd15
type framebuf_device_t;
Chris PeBenito b4cd15
class dir { getattr read search };
Chris PeBenito b4cd15
class chr_file { getattr read ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# devices_write_framebuffer(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_write_framebuffer',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr read search };
Chris PeBenito b4cd15
allow $1 framebuf_device_t:chr_file { getattr write ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_write_framebuffer_depend',`
Chris PeBenito b4cd15
type device_t, framebuf_device_t;
Chris PeBenito b4cd15
class dir { getattr read search };
Chris PeBenito b4cd15
class chr_file { getattr write ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# devices_read_misc(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_read_misc',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr read search };
Chris PeBenito b4cd15
allow $1 misc_device_t:chr_file { getattr read ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_read_misc_depend',`
Chris PeBenito b4cd15
type device_t, misc_device_t;
Chris PeBenito b4cd15
class dir { getattr read search };
Chris PeBenito b4cd15
class chr_file { getattr read ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# devices_write_misc(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_write_misc',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr read search };
Chris PeBenito b4cd15
allow $1 misc_device_t:chr_file { getattr write ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_write_misc_depend',`
Chris PeBenito b4cd15
type device_t, misc_device_t;
Chris PeBenito b4cd15
class dir { getattr read search };
Chris PeBenito b4cd15
class chr_file { getattr write ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# devices_get_mouse_input(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_get_mouse_input',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr read search };
Chris PeBenito b4cd15
allow $1 mouse_device_t:chr_file { getattr read ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_get_mouse_input_depend',`
Chris PeBenito b4cd15
type device_t, mouse_device_t;
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr read search };
Chris PeBenito b4cd15
class chr_file { getattr read ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# devices_get_input_event(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_get_input_event',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr read search };
Chris PeBenito b4cd15
allow $1 event_device_t:chr_file { getattr read ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_get_input_event_depend',`
Chris PeBenito b4cd15
type device_t, event_device_t;
Chris PeBenito b4cd15
class dir { getattr read search };
Chris PeBenito b4cd15
class chr_file { getattr read ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# devices_get_cpuid(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_get_cpuid',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr read search };
Chris PeBenito b4cd15
allow $1 cpu_device_t:chr_file { getattr read ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_get_cpuid_depend',`
Chris PeBenito b4cd15
type device_t, cpu_device_t;
Chris PeBenito b4cd15
class dir { getattr read search };
Chris PeBenito b4cd15
class chr_file { getattr read ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# devices_load_cpu_microcode(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_load_cpu_microcode',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr read search };
Chris PeBenito b4cd15
allow $1 cpu_device_t:chr_file { getattr read write ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_load_cpu_microcode_depend',`
Chris PeBenito b4cd15
type device_t, cpu_device_t;
Chris PeBenito b4cd15
class dir { getattr read search };
Chris PeBenito b4cd15
class chr_file { getattr read write ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# devices_use_scanner(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_use_scanner',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr read search };
Chris PeBenito b4cd15
allow $1 scanner_device_t:chr_file { getattr read write ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_use_scanner_depend',`
Chris PeBenito b4cd15
type device_t, scanner_device_t;
Chris PeBenito b4cd15
class dir { getattr read search };
Chris PeBenito b4cd15
class chr_file { getattr read write ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# devices_control_system_powermanagement(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`devices_control_system_powermanagement',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 device_t:dir { getattr read search };
Chris PeBenito b4cd15
allow $1 power_device_t:chr_file { getattr read write ioctl };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`devices_control_system_powermanagement_depend',`
Chris PeBenito b4cd15
type device_t, power_device_t;
Chris PeBenito b4cd15
class dir { getattr read search };
Chris PeBenito b4cd15
class chr_file { getattr read write ioctl };
Chris PeBenito b4cd15
')