Subject: getttyent problem exposed
To: None <>
From: Eric J. Haug <>
List: current-users
Date: 06/29/1994 22:18:24
In the following file, i have found an error.

/*static char *sccsid = "from: @(#)getttyent.c	5.10 (Berkeley) 3/23/91";*/
static char *rcsid = "$Id: getttyent.c,v 1.7 1994/03/30 08:22:07 cgd Exp $";

try to get ttyflags to do anything resembling setting the rtscts or softcar
or local flags. if the filed is "on unsecure rtscts softcar"

Around line 105, the following mess exists:
	for (; *p; p = skip(p)) {
		if (scmp(_TTYS_OFF))
			tty.ty_status &= ~TTY_ON;
		else if (scmp(_TTYS_ON))
			tty.ty_status |= TTY_ON;
		else if (scmp(_TTYS_SECURE))
			tty.ty_status |= TTY_SECURE;
		else if (scmp(_TTYS_LOCAL))
			tty.ty_status |= TTY_LOCAL;
		else if (scmp(_TTYS_RTSCTS))
			tty.ty_status |= TTY_RTSCTS;
		else if (scmp(_TTYS_SOFTCAR))
			tty.ty_status |= TTY_SOFTCAR;
		else if (scmp(_TTYS_MDMBUF))
			tty.ty_status |= TTY_MDMBUF;
		else if (vcmp(_TTYS_WINDOW))
			tty.ty_window = value(p);
This will fail to do the documented thing
if the /etc/ttys file contains "unsecure" instead of secure.
One could add the case
		else if (scmp("unsecure"))

or maybe a redesign is in order.