Subject: bin/25605: handling of tty modes in getty inconsistent
To: None <gnats-bugs@gnats.NetBSD.org>
From: Frank Kardel <kardel@pip.acrys.com>
List: netbsd-bugs
Date: 05/17/2004 08:03:36
>Number: 25605
>Category: bin
>Synopsis: getty leaves ttymodes at read login state when exec-ing pppd
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon May 17 06:04:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: Frank Kardel
>Release: NetBSD 2.0E
>Organization:
>Environment:
System: NetBSD pip 2.0E NetBSD 2.0E (SYSPIP_ISDN) #2: Sun May 9 20:16:18 MEST 2004 kardel@pip:/fs/IC35L180AVV207-1-n/IC35L120AVV207-0-e/src/NetBSD/netbsd/sys/arch/i386/compile/obj.i386/SYSPIP_ISDN i386
Architecture: i386
Machine: i386
>Description:
When configuring getty on a line for PPP login the tty modes
are set to the values given in the {c,i,l,o}1 flags when exec-ing.
These mode flags are used when getty reads the login name
(or the PPP sequence). Upon reading the getty tab documentation one
would expect that pppd should be started with the {c,i,l,o}2 flags,
which is not the case in the current implementation.
When exec-ing the normal login program getty sets the modes to
the expected {c,i,l,o}2 flags.
>How-To-Repeat:
Try to make a modem line with ppp support work and trip over
unexpected mode settings.
>Fix:
Either) Add patch below.
Or) fix getty/gettytab manual to document the current behaviour.
Index: main.c
===================================================================
RCS file: /cvsroot/src/libexec/getty/main.c,v
retrieving revision 1.45
diff -c -r1.45 main.c
*** main.c 7 Aug 2003 09:46:42 -0000 1.45
--- main.c 17 May 2004 06:02:52 -0000
***************
*** 379,384 ****
--- 379,385 ----
*q++ = *p++;
}
} else if ((rval = getname()) == 2) {
+ setflags(2);
execle(PP, "ppplogin", ttyn, (char *) 0, env);
syslog(LOG_ERR, "%s: %m", PP);
exit(1);
>Release-Note:
>Audit-Trail:
>Unformatted: