Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Mar 1999 17:07:09 -0500 (EST)
From:      Max.Euston@archive.jmrodgers.com
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/10399: Bad cpu limit (60s) w/ getty+ppp
Message-ID:  <199903042207.RAA13669@archive.jmrodgers.com>

next in thread | raw e-mail | index | archive | help

>Number:         10399
>Category:       bin
>Synopsis:       Bad cpu limit w/ (60s) w/ getty+ppp
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar  5 06:10:01 PST 1999
>Closed-Date:
>Last-Modified:
>Originator:     Max Euston
>Release:        FreeBSD 2.2.8-RELEASE i386
>Organization:
>Environment:

	2.2.8-RELEASE (but same problem with all versions)

>Description:

getty sets a SOFT cpu limit to 60 seconds to help detect hung lines.
It resets this to infinity before exec()ing login, but does not reset
it before exec()ing "ppplogin" (set with pp=... in /etc/gettytab).

>How-To-Repeat:

Set "pp=..." in /etc/gettytab and ppp-connect to this line.  The
connection will silently drop some time in the future (15 minutes to
several hours depending on line usage).

>Fix:

1) Apply this patch:

--- /src/libexec/getty/main.c.orig      Mon Dec 15 02:10:53 1997
+++ /src/libexec/getty/main.c   Wed Mar  3 14:58:44 1999
@@ -349,6 +349,9 @@
                if ((rval = getname()) == 2) {
                        oflush();
                        alarm(0);
+                       limit.rlim_max = RLIM_INFINITY;
+                       limit.rlim_cur = RLIM_INFINITY;
+                       (void)setrlimit(RLIMIT_CPU, &limit);
                        execle(PP, "ppplogin", ttyn, (char *) 0, env);
                        syslog(LOG_ERR, "%s: %m", PP);
                        exit(1);


2) Workaround:

Have "pp=..." set to a shell script that does a "ulimit -t unlimited"
(or limit for csh) before running "ppp -direct".



>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?199903042207.RAA13669>