Chris PeBenito e181fe
# Copyright (C) 2005 Tresys Technology, LLC
Chris PeBenito e181fe
Chris PeBenito 960373
policy_module(storage,1.0)
Chris PeBenito 960373
Chris PeBenito 8e0280
attribute fixed_disk_raw_read;
Chris PeBenito 8e0280
attribute fixed_disk_raw_write;
Chris PeBenito 8e0280
attribute scsi_generic_read;
Chris PeBenito 8e0280
attribute scsi_generic_write;
Chris PeBenito 8e0280
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# fixed_disk_device_t is the type of 
Chris PeBenito b4cd15
# /dev/hd* and /dev/sd*.
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
type fixed_disk_device_t;
Chris PeBenito 8e0280
devices_make_device_node(fixed_disk_device_t)
Chris PeBenito b4cd15
Chris PeBenito b4cd15
neverallow ~fixed_disk_raw_read fixed_disk_device_t:{ chr_file blk_file } read;
Chris PeBenito b4cd15
neverallow ~fixed_disk_raw_write fixed_disk_device_t:{ chr_file blk_file } { append write };
Chris PeBenito b4cd15
Chris PeBenito 8e0280
#
Chris PeBenito 8e0280
# lvm_vg_t is the type of logical volume groups
Chris PeBenito 8e0280
#
Chris PeBenito 700988
type lvm_vg_t;
Chris PeBenito 700988
devices_make_device_node(lvm_vg_t)
Chris PeBenito 700988
Chris PeBenito 8e0280
# from the subject's point of view, same as read/writing a regular
Chris PeBenito 8e0280
# fixed disk, so use the same assertions as above
Chris PeBenito 8e0280
neverallow ~fixed_disk_raw_read lvm_vg_t:{ chr_file blk_file } read;
Chris PeBenito 8e0280
neverallow ~fixed_disk_raw_write lvm_vg_t:{ chr_file blk_file } { append write };
Chris PeBenito 8e0280
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# scsi_generic_device_t is the type of /dev/sg*
Chris PeBenito b4cd15
# it gives access to ALL SCSI devices (both fixed and removable)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
type scsi_generic_device_t;
Chris PeBenito 8e0280
devices_make_device_node(scsi_generic_device_t)
Chris PeBenito b4cd15
Chris PeBenito b4cd15
neverallow ~scsi_generic_read scsi_generic_device_t:{ chr_file blk_file } read;
Chris PeBenito b4cd15
neverallow ~scsi_generic_write scsi_generic_device_t:{ chr_file blk_file } { append write };
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# removable_device_t is the type of
Chris PeBenito b4cd15
# /dev/scd* and /dev/fd*.
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
type removable_device_t;
Chris PeBenito b4cd15
devices_make_device_node(removable_device_t)
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# tape_device_t is the type of
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
type tape_device_t;
Chris PeBenito b4cd15
devices_make_device_node(tape_device_t)