Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Jan 2005 09:51:23 +1100 (EST)
From:      PeterJeremy@optushome.com.au
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        andrew.li@alcatel.com.au
Subject:   conf/76226: Default local.9600 gettytab initially uses parity
Message-ID:  <200501132251.j0DMpNdm069023@server.vk2pj.dyndns.org>
Resent-Message-ID: <200501132300.j0DN0ktB039647@freefall.freebsd.org>

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

>Number:         76226
>Category:       conf
>Synopsis:       Default local.9600 gettytab initially uses parity
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 13 23:00:46 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Peter Jeremy
>Release:        FreeBSD 5.3-RELEASE-p2 i386
>Organization:
Alcatel Australia Limited
>Environment:
System: FreeBSD server.vk2pj.dyndns.org 5.3-RELEASE-p2 FreeBSD 5.3-RELEASE-p2 #48: Wed Jan 5 03:01:20 EST 2005 root@server.vk2pj.dyndns.org:/home/obj/k7/home/src5/sys/server i386

I originally noted the problem in 4.10-RELEASE-p2 and the problem also appears
to exist in -current.

>Description:
	The local.9600 definition in /etc/gettytab uses binary termios(4)
	definitions to define the tty state.  Both the actual field content
	and preceeding comments indicate that parity is disabled but getty
	internally simulates even-parity because the 'np' flag is not
	specified.

	This behaviour is mentioned in gettytab(5) (though not in association
	with the 'np' flag definition) but is somewhat counter-intuitative.
	If the termios state is explicitly set to no parity, that it what
	I expect to see.

>How-To-Repeat:
	Start a getty using local.9600 eg using the following /etc/ttys line:
ttyd0	"/usr/libexec/getty local.9600"	dialup	on secure
	Connect a serial terminal set to CS8, no parity to ttyd0 (or whatever)
	Note that the login banner is written as 7-bit even parity.
	Type input and note that the input is echoed as 7-bit even parity.
	Hit return twice to exec login and note that the second login: prompt
	is generated with 8-bit no parity.

>Fix:

	The quick fix is to add 'np' to the local.9600 definition in
	/etc/gettytab.

	I believe a better fix would be to copy the PARENB flag from the
	relevant c0/c1/c2 into NP unless NP is explicitly set.
>Release-Note:
>Audit-Trail:
>Unformatted:



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