From luigi@iet.unipi.it  Fri Oct 18 15:52:13 1996
Received: from prova.iet.unipi.it (prova1.iet.unipi.it [131.114.9.11])
          by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id PAA28442
          for <FreeBSD-gnats-submit@freebsd.org>; Fri, 18 Oct 1996 15:52:08 -0700 (PDT)
Received: (from luigi@localhost) by prova.iet.unipi.it (8.6.12/8.6.12) id AAA00617; Sat, 19 Oct 1996 00:56:08 +0200
Message-Id: <199610182256.AAA00617@prova.iet.unipi.it>
Date: Sat, 19 Oct 1996 00:56:08 +0200
From: Luigi Rizzo <luigi@iet.unipi.it>
Reply-To: luigi@iet.unipi.it
To: FreeBSD-gnats-submit@freebsd.org
Subject: getttyent() arbitrary 100 char limit
X-Send-Pr-Version: 3.2

>Number:         1838
>Category:       misc
>Synopsis:       getttyent() arbitrary 100 char limit
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 18 16:00:02 PDT 1996
>Closed-Date:    Sat Oct 19 18:30:14 MET DST 1996
>Last-Modified:  Sat Oct 19 18:31:33 MET DST 1996
>Originator:     Luigi Rizzo
>Release:        any ?
>Organization:
>Environment:

	

>Description:

	getttyent() has a limit of 100 char for input lines. This
	causes problems when there are long lines in /etc/ttys, e.g.
	when using mgetty with chat strings supplied on the command
	line.

	Worst thing is that the line is dropped silently.

>How-To-Repeat:

	use a line > 100 chars in /etc/ttys

>Fix:
	
	in libc/gen/getttyent.c, line 66, change the definition of
	MAXLINELENGTH to a larger value, e.g. 256 or 512.

        Also, it would be probably worth mentioning the existence of
	this limitation in /etc/ttys, e.g. add the following:

	# IMPORTANT: lines must be shorter than XXX chars

	Luigi
====================================================================
Luigi Rizzo                     Dip. di Ingegneria dell'Informazione
email: luigi@iet.unipi.it       Universita' di Pisa
tel: +39-50-568533              via Diotisalvi 2, 56126 PISA (Italy)
fax: +39-50-568522              http://www.iet.unipi.it/~luigi/
====================================================================
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: joerg 
State-Changed-When: Sat Oct 19 18:30:14 MET DST 1996 
State-Changed-Why:  
Fixed by making the line buffer dynamic in rev 1.4 of getttyent.c. 

>Unformatted:
 
