documentation_complete: true

title: 'Disable legacy (BSD) PTY support'

description: |-
    Disable the Linux traditional BSD-like terminal names /dev/ptyxx for masters and /dev/ttyxx for
    slaves of pseudo terminals, and use only the modern ptys (devpts) interface.

    {{{ describe_kernel_build_config("CONFIG_LEGACY_PTYS", "n") | indent(4) }}}

rationale: |-
    The legacy scheme has a number of security problems.

warnings:
    {{{ warning_kernel_build_config() | indent(4) }}}

severity: medium

identifiers:
    cce@rhel8: CCE-87925-4
    cce@rhel9: CCE-87926-2
    cce@rhel10: CCE-89570-6

ocil_clause: 'the kernel was not built with the required value'

ocil: |-
    {{{ ocil_kernel_build_config("CONFIG_LEGACY_PTYS", "n") | indent(4) }}}

template:
    name: kernel_build_config
    vars:
        config: CONFIG_LEGACY_PTYS
        value: 'n'

