securetty_types(5)

πŸ’– securetty_types β€” the SELinux secure tty type config file πŸ’–

okay bestie, welcome to securetty_types(5), the manual page for the little config file that tells SELinux which ttys count as secure ttys. she's section 5, she's SELinux configuration, and she's lowkey iconic. let's get into it 🫢


✨ NAME ✨

securetty_types β€” The SELinux secure tty type configuration file


🌸 DESCRIPTION 🌸

so the securetty_types file is literally just a list of types associated with the secure tty type, and those types are defined in the policy for use by SELinux-aware applications. that's the whole gig. no cap πŸ’…

if you need the path to the active policy's version of this file, selinux_securetty_types_path(3) will hand it over. the default securetty types file lives at:

/etc/selinux/{SELINUXTYPE}/contexts/securetty_types

and <pink>{SELINUXTYPE}</pink> is the entry you pull from the selinux configuration file config β€” go peek at selinux_config(5) if you need the deets πŸ‘‘

now, selinux_check_securetty_context(3) is the one that actually reads this file, to figure out whether a given context is for a secure tty that's defined in the active policy. main character behaviour fr fr πŸ”₯

and SELinux-aware applications β€” like newrole(1) β€” use this info to check the status of a tty. so yeah, this tiny file is doing a lot of heavy lifting behind the scenes. respect her 😭


πŸŽ€ FILE FORMAT πŸŽ€

every line in the file is made up of the following entry:

  • type β€” one or more type entries that are defined in the policy for secure tty devices. that's it, that's the line, she's simple and she ate ✨

πŸ¦‹ EXAMPLE πŸ¦‹

# ./contexts/securetty_types
sysadm_tty_device_t
user_tty_device_t
staff_tty_device_t

look at her go. three whole types, vibing in a file, minding her business 🌈


πŸ‘‘ SEE ALSO πŸ‘‘

selinux(8), selinux_securetty_types_path(3), newrole(1), selinux_check_securetty_context(3), selinux_config(5)


and that's the whole page, bestie!! this one came from Security Enhanced Linux, dated 28-Nov-2011 β€” yeah she's an older queen but she still serves πŸ’œ mwah, go read your tty types, ily 🫢