Chris PeBenito e181fe
Chris PeBenito 2b3c99
policy_module(terminal,1.1.0)
Chris PeBenito 960373
Chris PeBenito fd89e1
########################################
Chris PeBenito fd89e1
#
Chris PeBenito fd89e1
# Declarations
Chris PeBenito fd89e1
#
Chris PeBenito b4cd15
attribute ttynode;
Chris PeBenito b4cd15
attribute ptynode;
Chris PeBenito b16c6b
attribute server_ptynode;
Chris PeBenito ef5ca0
attribute serial_device;
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#
Chris PeBenito a2d824
# bsdpty_device_t is the type of /dev/[tp]ty[abcdepqrstuvwxyz][0-9a-f]
Chris PeBenito a2d824
type bsdpty_device_t;
Karl MacMillan f0c985
dev_node(bsdpty_device_t)
Chris PeBenito a2d824
Chris PeBenito a2d824
#
Chris PeBenito b4cd15
# console_device_t is the type of /dev/console.
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
type console_device_t;
Karl MacMillan f0c985
dev_node(console_device_t)
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#
Chris PeBenito a2d824
# devpts_t is the type of the devpts file system and 
Chris PeBenito a2d824
# the type of the root directory of the file system.
Chris PeBenito a2d824
#
Chris PeBenito a2d824
type devpts_t;
Chris PeBenito c9428d
files_mountpoint(devpts_t)
Chris PeBenito 33acca
fs_associate_tmpfs(devpts_t)
Chris PeBenito 33acca
files_associate_tmp(devpts_t)
Chris PeBenito cbca03
fs_type(devpts_t)
Chris PeBenito e02c61
fs_use_trans devpts gen_context(system_u:object_r:devpts_t,s0);
Chris PeBenito a2d824
Chris PeBenito 77f6e2
ifdef(`targeted_policy',`
Chris PeBenito 7afca0
	# cjp: the ttynode should probably be removed.
Chris PeBenito 7afca0
	typeattribute devpts_t ttynode, ptynode;
Chris PeBenito 77f6e2
')
Chris PeBenito 77f6e2
Chris PeBenito a2d824
#
Chris PeBenito b4cd15
# devtty_t is the type of /dev/tty.
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
type devtty_t;
Karl MacMillan f0c985
dev_node(devtty_t)
Chris PeBenito f0574f
mls_trusted_object(devtty_t)
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#
Chris PeBenito a2d824
# ptmx_t is the type for /dev/ptmx.
Chris PeBenito b4cd15
#
Chris PeBenito f0574f
type ptmx_t;
Karl MacMillan f0c985
dev_node(ptmx_t)
Chris PeBenito f0574f
mls_trusted_object(ptmx_t)
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#
Chris PeBenito a2d824
# tty_device_t is the type of /dev/*tty*
Chris PeBenito a2d824
#
Chris PeBenito ef5ca0
type tty_device_t, serial_device;
Karl MacMillan f0c985
dev_node(tty_device_t)
Chris PeBenito b4cd15
Chris PeBenito 7afca0
ifdef(`targeted_policy',`
Chris PeBenito 7afca0
	typeattribute tty_device_t ttynode;
Chris PeBenito 7afca0
')
Chris PeBenito 7afca0
Chris PeBenito 33bc0d
#
Chris PeBenito 33bc0d
# usbtty_device_t is the type of /dev/usr/tty*
Chris PeBenito 33bc0d
#
Chris PeBenito ef5ca0
type usbtty_device_t, serial_device;
Karl MacMillan f0c985
dev_node(usbtty_device_t)