From kfurge@kcfhome.my.domain  Sat May 31 15:21:54 1997
Received: from kcfhome.my.domain (196.bridgeton-001.mo.dial-access.att.net [207.146.192.196])
          by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id PAA19831
          for <FreeBSD-gnats-submit@freebsd.org>; Sat, 31 May 1997 15:21:43 -0700 (PDT)
Received: (from kfurge@localhost)
	by kcfhome.my.domain (8.8.5/8.8.5) id RAA14372;
	Sat, 31 May 1997 17:21:34 -0500 (EST)
Message-Id: <199705312221.RAA14372@kcfhome.my.domain>
Date: Sat, 31 May 1997 17:21:34 -0500 (EST)
From: kfurge@worldnet.att.net
Reply-To: kfurge@worldnet.att.net
To: FreeBSD-gnats-submit@freebsd.org
Subject: getty with 'to' option causes pppd to die when invoked by auto-ppp code
X-Send-Pr-Version: 3.2

>Number:         3733
>Category:       bin
>Synopsis:       getty with 'to' option causes pppd to die when invoked by auto-ppp code
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    davidn
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 31 15:30:01 PDT 1997
>Closed-Date:    Tue Apr 14 12:21:18 PDT 1998
>Last-Modified:  Tue Apr 14 12:21:34 PDT 1998
>Originator:     K.C. Furge
>Release:        FreeBSD 2.2.1-RELEASE i386
>Organization:
Home user
>Environment:

	
/etc/gettytab entry:

dial.115200:\
        :np:to#30:sp#115200:pp=/usr/sbin/pppd

>Description:

	
With the timeout option enabled in a gettytab entry (:to#30:) and pppd 
invoked when getty automatically detects a ppp header, pppd dies with
SIGALRM when the timeout occurrs.

>How-To-Repeat:

	
Add the ':to#30:' option to a getty dialup config.  Set the 'pp' option to 
automatically start pppd when getty detects a ppp frame.  Pppd will then
die when getty should have died due to a timeout.

>Fix:
	
	
Apply the following patch to main.c of the getty source.  This patch is 
relative to -current as of May 31, 1997.

*** main.c.orig Sat May 31 14:42:56 1997
--- main.c      Sat May 31 14:43:01 1997
***************
*** 349,354 ****
--- 349,357 ----
                        alarm(TO);
                }
                if ((rval = getname()) == 2) {
+                       oflush();
+                       alarm(0);
+                       signal(SIGALRM, SIG_DFL);
                        execle(PP, "ppplogin", ttyn, (char *) 0, env);
                        syslog(LOG_ERR, "%s: %m", PP);
                        exit(1);

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: davidn 
State-Changed-When: Tue Jun 3 22:57:34 EST 1997 
State-Changed-Why:  
Patch committed to reset alarm timer. signal handler already reset by exec. 
/home/ncvs/src/libexec/getty/main.c,v  <--  main.c 
new revision: 1.20; previous revision: 1.19 
done 
/home/ncvs/src/libexec/getty/main.c,v  <--  main.c 
new revision: 1.10.2.4; previous revision: 1.10.2.3 
done 
Responsible-Changed-From-To: freebsd-bugs->davidn 
Responsible-Changed-By: davidn 
Responsible-Changed-When: Tue Jun 3 23:02:11 EST 1997 
Responsible-Changed-Why:  
To remind myself to follow this up later. 
State-Changed-From-To: feedback->closed 
State-Changed-By: phk 
State-Changed-When: Tue Apr 14 12:21:18 PDT 1998 
State-Changed-Why:  
tiemd out 
>Unformatted:
