selinux-refpolicy/policy/modules/kernel/terminal.te
Dominick Grift a43a205931 Initial virtio console device
Also known as 'vmchannel', a transport mechanism is needed for
communication between the host userspace and guest userspace for
achieving things like making clipboard copy/paste work seamlessly across
the host and guest, locking the guest screen in case the vnc session to
the guest is closed and so on. This can be used in offline cases as
well, for example with libguestfs to probe which file systems the guest
uses, the apps installed, etc.

Virtio-serial is just the transport protocol that will enable such
applications to be written. It has two parts: (a) device emulation in
qemu that presents a virtio-pci device to the guest and (b) a guest
driver that presents a char device interface to userspace applications.

Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-26 10:27:29 -04:00

63 lines
1.2 KiB
Plaintext

policy_module(terminal, 1.11.0)
########################################
#
# Declarations
#
attribute ttynode;
attribute ptynode;
attribute server_ptynode;
attribute serial_device;
#
# bsdpty_device_t is the type of /dev/[tp]ty[abcdepqrstuvwxyz][0-9a-f]
type bsdpty_device_t;
dev_node(bsdpty_device_t)
#
# console_device_t is the type of /dev/console.
#
type console_device_t;
dev_node(console_device_t)
#
# devpts_t is the type of the devpts file system and
# the type of the root directory of the file system.
#
type devpts_t;
files_mountpoint(devpts_t)
fs_associate_tmpfs(devpts_t)
fs_type(devpts_t)
fs_use_trans devpts gen_context(system_u:object_r:devpts_t,s0);
#
# devtty_t is the type of /dev/tty.
#
type devtty_t;
dev_node(devtty_t)
mls_trusted_object(devtty_t)
#
# ptmx_t is the type for /dev/ptmx.
#
type ptmx_t;
dev_node(ptmx_t)
mls_trusted_object(ptmx_t)
allow ptmx_t devpts_t:filesystem associate;
#
# tty_device_t is the type of /dev/*tty*
#
type tty_device_t, serial_device;
dev_node(tty_device_t)
#
# usbtty_device_t is the type of /dev/usr/tty*
#
type usbtty_device_t, serial_device;
dev_node(usbtty_device_t)
type virtio_device_t, serial_device;
dev_node(virtio_device_t)