2022-01-06 13:55:54 +00:00
|
|
|
policy_module(terminal)
|
2005-04-26 17:00:25 +00:00
|
|
|
|
2005-06-30 18:54:08 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
2005-04-14 20:18:17 +00:00
|
|
|
attribute ttynode;
|
|
|
|
attribute ptynode;
|
2005-05-16 21:10:33 +00:00
|
|
|
attribute server_ptynode;
|
2005-10-23 22:10:59 +00:00
|
|
|
attribute serial_device;
|
2005-04-14 20:18:17 +00:00
|
|
|
|
2005-04-28 21:41:09 +00:00
|
|
|
#
|
|
|
|
# bsdpty_device_t is the type of /dev/[tp]ty[abcdepqrstuvwxyz][0-9a-f]
|
|
|
|
type bsdpty_device_t;
|
2005-06-13 16:22:32 +00:00
|
|
|
dev_node(bsdpty_device_t)
|
2005-04-28 21:41:09 +00:00
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
# console_device_t is the type of /dev/console.
|
|
|
|
#
|
|
|
|
type console_device_t;
|
2005-06-13 16:22:32 +00:00
|
|
|
dev_node(console_device_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
|
2005-04-28 21:41:09 +00:00
|
|
|
#
|
2009-11-24 16:11:38 +00:00
|
|
|
# devpts_t is the type of the devpts file system and
|
2005-04-28 21:41:09 +00:00
|
|
|
# the type of the root directory of the file system.
|
|
|
|
#
|
|
|
|
type devpts_t;
|
2017-08-12 08:34:59 +00:00
|
|
|
dev_associate(devpts_t)
|
2005-06-13 17:35:46 +00:00
|
|
|
files_mountpoint(devpts_t)
|
2005-10-26 16:00:13 +00:00
|
|
|
fs_associate_tmpfs(devpts_t)
|
2014-04-04 20:52:53 +00:00
|
|
|
fs_xattr_type(devpts_t)
|
2005-10-06 19:33:06 +00:00
|
|
|
fs_use_trans devpts gen_context(system_u:object_r:devpts_t,s0);
|
2005-04-28 21:41:09 +00:00
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
# devtty_t is the type of /dev/tty.
|
|
|
|
#
|
|
|
|
type devtty_t;
|
2005-06-13 16:22:32 +00:00
|
|
|
dev_node(devtty_t)
|
2005-09-26 20:26:32 +00:00
|
|
|
mls_trusted_object(devtty_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
|
2021-12-16 15:34:25 +00:00
|
|
|
optional_policy(`
|
|
|
|
container_mountpoint(devtty_t)
|
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-04-28 21:41:09 +00:00
|
|
|
# ptmx_t is the type for /dev/ptmx.
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-09-26 20:26:32 +00:00
|
|
|
type ptmx_t;
|
2005-06-13 16:22:32 +00:00
|
|
|
dev_node(ptmx_t)
|
2005-09-26 20:26:32 +00:00
|
|
|
mls_trusted_object(ptmx_t)
|
2009-11-19 19:57:49 +00:00
|
|
|
allow ptmx_t devpts_t:filesystem associate;
|
2005-04-14 20:18:17 +00:00
|
|
|
|
|
|
|
#
|
2005-04-28 21:41:09 +00:00
|
|
|
# tty_device_t is the type of /dev/*tty*
|
|
|
|
#
|
2005-10-23 22:10:59 +00:00
|
|
|
type tty_device_t, serial_device;
|
2005-06-13 16:22:32 +00:00
|
|
|
dev_node(tty_device_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
|
2005-04-21 22:46:49 +00:00
|
|
|
#
|
|
|
|
# usbtty_device_t is the type of /dev/usr/tty*
|
|
|
|
#
|
2005-10-23 22:10:59 +00:00
|
|
|
type usbtty_device_t, serial_device;
|
2005-06-13 16:22:32 +00:00
|
|
|
dev_node(usbtty_device_t)
|
2013-09-24 13:39:56 +00:00
|
|
|
|
|
|
|
type virtio_device_t, serial_device;
|
|
|
|
dev_node(virtio_device_t)
|