Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Oct 1996 00:56:08 +0200
From:      Luigi Rizzo <luigi@iet.unipi.it>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   misc/1838: getttyent() arbitrary 100 char limit
Message-ID:  <199610182256.AAA00617@prova.iet.unipi.it>
Resent-Message-ID: <199610182300.QAA28994@freefall.freebsd.org>

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

>Number:         1838
>Category:       misc
>Synopsis:       getttyent() arbitrary 100 char limit
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 18 16:00:02 PDT 1996
>Last-Modified:
>Originator:     Luigi Rizzo
>Organization:
>Release:        any ?
>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/
====================================================================
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610182256.AAA00617>