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
|
|
|
# storage_raw_read_fixed_disk(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`storage_raw_read_fixed_disk',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
typeattribute $1 fixed_disk_raw_read;
|
|
|
|
devices_list_device_nodes($1,optional)
|
|
|
|
allow $1 fixed_disk_device_t:blk_file { getattr read ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`storage_raw_read_fixed_disk_depend',`
|
|
|
|
type fixed_disk_device_t;
|
|
|
|
attribute fixed_disk_raw_read;
|
|
|
|
class blk_file { getattr read ioctl };
|
|
|
|
devices_list_device_nodes_depend
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# storage_raw_write_fixed_disk(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`storage_raw_write_fixed_disk',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
typeattribute $1 fixed_disk_raw_write;
|
|
|
|
devices_list_device_nodes($1,optional)
|
|
|
|
allow $1 fixed_disk_device_t:blk_file { getattr write ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`storage_raw_write_fixed_disk_depend',`
|
|
|
|
type fixed_disk_device_t;
|
|
|
|
attribute fixed_disk_raw_write;
|
|
|
|
class blk_file { getattr write ioctl };
|
|
|
|
devices_list_device_nodes_depend
|
|
|
|
')
|
|
|
|
|
2005-04-22 19:31:32 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# storage_get_fixed_disk_attributes(domain)
|
2005-04-22 19:31:32 +00:00
|
|
|
#
|
|
|
|
define(`storage_get_fixed_disk_attributes',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-22 19:31:32 +00:00
|
|
|
devices_list_device_nodes($1,optional)
|
|
|
|
allow $1 fixed_disk_device_t:blk_file getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`storage_get_fixed_disk_attributes_depend',`
|
|
|
|
type fixed_disk_device_t;
|
|
|
|
class blk_file getattr;
|
|
|
|
devices_list_device_nodes_depend
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# storage_set_fixed_disk_attributes(domain)
|
2005-04-22 19:31:32 +00:00
|
|
|
#
|
|
|
|
define(`storage_set_fixed_disk_attributes',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-22 19:31:32 +00:00
|
|
|
devices_list_device_nodes($1,optional)
|
|
|
|
allow $1 fixed_disk_device_t:blk_file setattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`storage_set_fixed_disk_attributes_depend',`
|
|
|
|
type fixed_disk_device_t;
|
|
|
|
class blk_file setattr;
|
|
|
|
devices_list_device_nodes_depend
|
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# storage_read_scsi_generic(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`storage_read_scsi_generic',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
typeattribute $1 scsi_generic_read;
|
|
|
|
devices_list_device_nodes($1,optional)
|
|
|
|
allow $1 scsi_generic_device_t:blk_file { getattr read ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`storage_read_scsi_generic_depend',`
|
|
|
|
type scsi_generic_device_t;
|
|
|
|
attribute scsi_generic_read;
|
|
|
|
class blk_file { getattr read ioctl };
|
|
|
|
devices_list_device_nodes_depend
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# storage_write_scsi_generic(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`storage_write_scsi_generic',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
typeattribute $1 scsi_generic_write;
|
|
|
|
devices_list_device_nodes($1,optional)
|
|
|
|
allow $1 fixed_disk_device_t:blk_file { getattr write ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`storage_write_scsi_generic_depend',`
|
|
|
|
type scsi_generic_device_t;
|
|
|
|
attribute scsi_generic_write;
|
|
|
|
class blk_file { getattr write ioctl };
|
|
|
|
devices_list_device_nodes_depend
|
|
|
|
')
|
|
|
|
|
2005-04-22 19:31:32 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# storage_get_scsi_generic_attributes(domain)
|
2005-04-22 19:31:32 +00:00
|
|
|
#
|
|
|
|
define(`storage_get_scsi_generic_attributes',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-22 19:31:32 +00:00
|
|
|
devices_list_device_nodes($1,optional)
|
|
|
|
allow $1 scsi_generic_device_t:blk_file getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`storage_get_scsi_generic_attributes_depend',`
|
|
|
|
type scsi_generic_device_t;
|
|
|
|
class blk_file getattr;
|
|
|
|
devices_list_device_nodes_depend
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# storage_set_scsi_generic_attributes(domain)
|
2005-04-22 19:31:32 +00:00
|
|
|
#
|
|
|
|
define(`storage_set_scsi_generic_attributes',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-22 19:31:32 +00:00
|
|
|
devices_list_device_nodes($1,optional)
|
|
|
|
allow $1 scsi_generic_device_t:blk_file setattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`storage_set_scsi_generic_attributes_depend',`
|
|
|
|
type scsi_generic_device_t;
|
|
|
|
class blk_file setattr;
|
|
|
|
devices_list_device_nodes_depend
|
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# storage_raw_read_removable_device(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`storage_raw_read_removable_device',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
devices_list_device_nodes($1,optional)
|
|
|
|
allow $1 removable_device_t:blk_file { getattr read ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`storage_raw_read_removable_device_depend',`
|
|
|
|
type removable_device_t;
|
|
|
|
class blk_file { getattr read ioctl };
|
|
|
|
devices_list_device_nodes_depend
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# storage_raw_write_removable_device(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`storage_raw_write_removable_device',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
devices_list_device_nodes($1,optional)
|
|
|
|
allow $1 removable_device_t:blk_file { getattr write ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`storage_raw_write_removable_device_depend',`
|
|
|
|
type removable_device_t;
|
|
|
|
class blk_file { getattr write ioctl };
|
|
|
|
devices_list_device_nodes_depend
|
|
|
|
')
|
|
|
|
|
2005-04-22 19:31:32 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# storage_get_removable_device_attributes(domain)
|
2005-04-22 19:31:32 +00:00
|
|
|
#
|
|
|
|
define(`storage_get_removable_device_attributes',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-22 19:31:32 +00:00
|
|
|
devices_list_device_nodes($1,optional)
|
|
|
|
allow $1 removable_device_t:blk_file getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`storage_get_removable_device_attributes_depend',`
|
|
|
|
type removable_device_t;
|
|
|
|
class blk_file getattr;
|
|
|
|
devices_list_device_nodes_depend
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# storage_set_removable_device_attributes(domain)
|
2005-04-22 19:31:32 +00:00
|
|
|
#
|
|
|
|
define(`storage_set_removable_device_attributes',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-22 19:31:32 +00:00
|
|
|
devices_list_device_nodes($1,optional)
|
|
|
|
allow $1 removable_device_t:blk_file setattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`storage_set_removable_device_attributes_depend',`
|
|
|
|
type removable_device_t;
|
|
|
|
class blk_file setattr;
|
|
|
|
devices_list_device_nodes_depend
|
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# storage_read_tape_device(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`storage_read_tape_device',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
devices_list_device_nodes($1,optional)
|
|
|
|
allow $1 tape_device_t:blk_file { getattr read ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`storage_read_tape_device_depend',`
|
|
|
|
type tape_device_t;
|
|
|
|
class blk_file { getattr read ioctl };
|
|
|
|
devices_list_device_nodes_depend
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# storage_write_tape_device(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`storage_write_tape_device',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
devices_list_device_nodes($1,optional)
|
|
|
|
allow $1 tape_device_t:blk_file { getattr write ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`storage_write_tape_device_depend',`
|
|
|
|
type tape_device_t;
|
|
|
|
class blk_file { getattr write ioctl };
|
|
|
|
devices_list_device_nodes_depend
|
|
|
|
')
|
2005-04-22 19:31:32 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# storage_get_tape_device_attributes(domain)
|
2005-04-22 19:31:32 +00:00
|
|
|
#
|
|
|
|
define(`storage_get_tape_device_attributes',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-22 19:31:32 +00:00
|
|
|
devices_list_device_nodes($1,optional)
|
|
|
|
allow $1 tape_device_t:blk_file getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`storage_get_tape_device_attributes_depend',`
|
|
|
|
type tape_device_t;
|
|
|
|
class blk_file getattr;
|
|
|
|
devices_list_device_nodes_depend
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# storage_set_tape_device_attributes(domain)
|
2005-04-22 19:31:32 +00:00
|
|
|
#
|
|
|
|
define(`storage_set_tape_device_attributes',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-22 19:31:32 +00:00
|
|
|
devices_list_device_nodes($1,optional)
|
|
|
|
allow $1 tape_device_t:blk_file setattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`storage_set_tape_device_attributes_depend',`
|
|
|
|
type tape_device_t;
|
|
|
|
class blk_file setattr;
|
|
|
|
devices_list_device_nodes_depend
|
|
|
|
')
|