Date: Sun, 23 Apr 2000 17:48:03 -0400 (EDT) From: Cyrus Rahman <cr@jcmax.com> To: FreeBSD-gnats-submit@freebsd.org Subject: bin/18181: Getty can fail to observe :de: specification unless present in default Message-ID: <200004232148.RAA26544@plasma.jcmax.com>
next in thread | raw e-mail | index | archive | help
>Number: 18181
>Category: bin
>Synopsis: Getty can fail to observe :de: specification unless present in default
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Apr 23 14:50:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Cyrus Rahman
>Release: FreeBSD 4.0-STABLE i386
>Organization:
>Environment:
>Description:
Getty does not process the :de: delay unless it is present in the default
terminal class. This is somewhat annoying, since a 15 second delay can be
most useful with a modem, but is generally unappreciated on the console.
Here's what happens:
As getty enters its main loop, it encounters the following code:
/*
* if a delay was specified then sleep for that
* number of seconds before writing the initial prompt
*/
if (first_sleep && DE) {
sleep(DE);
/* remove any noise */
(void)tcflush(STDIN_FILENO, TCIOFLUSH);
}
first_sleep = 0;
setttymode(tname, 0);
Until the setttymode(), only the default gettytab terminal class has been loaded.
Setttymode() contains the following code:
gettable(tname, tabent);
if (OPset || EPset || APset)
APset++, OPset++, EPset++;
setdefaults();
After which the correct terminal class is loaded.
>How-To-Repeat:
Set up hylafax to run a getty(8) upon detection of a data call, invoking getty
via "dly.152000 -", where the dly.152000 class has a non-null de field value.
Watch the connection process and observe that getty did not wait as required.
Notice that for once this bug isn't in hylafax.
>Fix:
Initializing the global class values from within setttymode() is not very pretty,
but was put there to move the tty-mode specific processing of the APset and other
flags there.
Gettable() should be moved to the top of the main loop, followed by a setdefaults().
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200004232148.RAA26544>
