Subject: lib/12862: openpty() tries to allocate ptyv*.
To: None <>
From: None <>
List: netbsd-bugs
Date: 05/07/2001 17:01:40
>Number:         12862
>Category:       lib
>Synopsis:       openpty() tries to allocate ptyv*.
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 07 17:01:00 PDT 2001
>Release:        <NetBSD-current source date> NetBSD 1.5
System: NetBSD 1.5.1_ALPHA NetBSD 1.5.1_ALPHA (NETZUUL) #34: Mon Apr 16 19:22:08 PDT 2001 i386

According to the i386 MAKEDEV, pty6 (aka ptyv*) conflicts with the
console ttyv0 device, so it's not created.

However, openpty() (basesrc/lib/libutil/pty.c) has

#define TTY_LETTERS     "pqrstuvwxyzPQRST"

and so it tries to allocate/use ptyv, which fails horribly.

This bug is not only in 1.5, but is in -current as well.
Try to create more than 80 telnet/sshd sessions on a box.
If ttyv* is no longer being used, fix MAKEDEV to create the devices and
    not worry about it.
If ttyv* is still being used, whack 'v' from the TTY_LETTERS string.

Of course, having some brave soul write a sysV-ish /dev/pts/37-style
thing wouldn't be bad...