selinux-refpolicy/policy/modules/kernel/terminal.fc
James Carter 90b214c004 Move use of user_devpts_t from terminal.fc to userdomain.fc
The type user_devpts_t is actually declared in userdomain.te and moving it
removes a dependency of the base module (which terminal is a part) on a
module.

Moved the file contexts to label slave pseudo terminals with the
user_devpts_t type from terminal.fc to userdomain.fc.

Signed-off-by: James Carter <jwcart2@tycho.nsa.gov>
2018-04-12 18:44:50 -04:00

47 lines
2.2 KiB
Plaintext

/dev/.*tty[^/]* -c gen_context(system_u:object_r:tty_device_t,s0)
/dev/[pt]ty[a-ep-z][0-9a-f] -c gen_context(system_u:object_r:bsdpty_device_t,s0)
/dev/adb.* -c gen_context(system_u:object_r:tty_device_t,s0)
/dev/capi.* -c gen_context(system_u:object_r:tty_device_t,s0)
/dev/console -c gen_context(system_u:object_r:console_device_t,s0)
/dev/cu.* -c gen_context(system_u:object_r:tty_device_t,s0)
/dev/dcbri[0-9]+ -c gen_context(system_u:object_r:tty_device_t,s0)
/dev/hpilo/[^/]* -c gen_context(system_u:object_r:tty_device_t,s0)
/dev/hvc.* -c gen_context(system_u:object_r:tty_device_t,s0)
/dev/hvsi.* -c gen_context(system_u:object_r:tty_device_t,s0)
/dev/i2c[^/]* -c gen_context(system_u:object_r:tty_device_t,s0)
/dev/ircomm[0-9]+ -c gen_context(system_u:object_r:tty_device_t,s0)
/dev/ip2[^/]* -c gen_context(system_u:object_r:tty_device_t,s0)
/dev/isdn.* -c gen_context(system_u:object_r:tty_device_t,s0)
/dev/ptmx -c gen_context(system_u:object_r:ptmx_t,s0)
/dev/rfcomm[0-9]+ -c gen_context(system_u:object_r:tty_device_t,s0)
/dev/slamr[0-9]+ -c gen_context(system_u:object_r:tty_device_t,s0)
/dev/tty -c gen_context(system_u:object_r:devtty_t,s0)
/dev/ttySG.* -c gen_context(system_u:object_r:tty_device_t,s0)
/dev/vport[0-9]p[0-9]+ -c gen_context(system_u:object_r:virtio_device_t,s0)
/dev/xvc[^/]* -c gen_context(system_u:object_r:tty_device_t,s0)
/dev/pty/.* -c gen_context(system_u:object_r:bsdpty_device_t,s0)
/dev/pts -d gen_context(system_u:object_r:devpts_t,s0-mls_systemhigh)
# if /dev/ptmx is a symlink to /dev/pts/ptmx then we need to have /dev/pts/ptmx
# relabelled before sshd etc are ready to accept connections
/dev/pts/ptmx -c gen_context(system_u:object_r:ptmx_t,s0)
/dev/tts/[^/]* -c gen_context(system_u:object_r:tty_device_t,s0)
/dev/usb/tty.* -c gen_context(system_u:object_r:usbtty_device_t,s0)
/dev/vcc?/.* -c gen_context(system_u:object_r:tty_device_t,s0)
/dev/vcs[^/]* -c gen_context(system_u:object_r:tty_device_t,s0)
/dev/xvc[0-9]* -c gen_context(system_u:object_r:tty_device_t,s0)
ifdef(`distro_gentoo',`
/dev/tts/[0-9]+ -c gen_context(system_u:object_r:tty_device_t,s0)
# used by init scripts to initally populate udev /dev
/usr/lib/udev/devices/console -c gen_context(system_u:object_r:console_device_t,s0)
')