From peterjeremy@optushome.com.au  Thu Jan 13 22:51:26 2005
Return-Path: <peterjeremy@optushome.com.au>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 86D3A16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 13 Jan 2005 22:51:26 +0000 (GMT)
Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183])
	by mx1.FreeBSD.org (Postfix) with ESMTP id AF77743D46
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 13 Jan 2005 22:51:25 +0000 (GMT)
	(envelope-from peterjeremy@optushome.com.au)
Received: from server.vk2pj.dyndns.org (c211-30-75-229.belrs2.nsw.optusnet.com.au [211.30.75.229])
	by mail02.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id j0DMpN8C024685
	(version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO);
	Fri, 14 Jan 2005 09:51:23 +1100
Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1])
	by server.vk2pj.dyndns.org (8.13.1/8.13.1) with ESMTP id j0DMpN41069024;
	Fri, 14 Jan 2005 09:51:23 +1100 (EST)
	(envelope-from peter@server.vk2pj.dyndns.org)
Received: (from peter@localhost)
	by server.vk2pj.dyndns.org (8.13.1/8.13.1/Submit) id j0DMpNdm069023;
	Fri, 14 Jan 2005 09:51:23 +1100 (EST)
	(envelope-from peter)
Message-Id: <200501132251.j0DMpNdm069023@server.vk2pj.dyndns.org>
Date: Fri, 14 Jan 2005 09:51:23 +1100 (EST)
From: peter@rulingia.com
To: FreeBSD-gnats-submit@freebsd.org
Cc: andrew.li@alcatel.com.au
Subject: Default local.9600 gettytab initially uses parity
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         76226
>Category:       conf
>Synopsis:       Default local.9600 gettytab initially uses parity
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    peterj
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 13 23:00:46 GMT 2005
>Closed-Date:    Wed Nov 28 11:02:44 UTC 2012
>Last-Modified:  Wed Nov 28 11:02:44 UTC 2012
>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:
Responsible-Changed-From-To: freebsd-bugs->peterj 
Responsible-Changed-By: eadler 
Responsible-Changed-When: Thu Oct 18 22:56:20 UTC 2012 
Responsible-Changed-Why:  
over to committer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=76226 
State-Changed-From-To: open->patched 
State-Changed-By: eadler 
State-Changed-When: Thu Oct 18 22:56:33 UTC 2012 
State-Changed-Why:  
committed 

http://www.freebsd.org/cgi/query-pr.cgi?pr=76226 
State-Changed-From-To: patched->closed 
State-Changed-By: peterj 
State-Changed-When: Wed Nov 28 11:02:03 UTC 2012 
State-Changed-Why:  
MFC'd to 7,8,9 

http://www.freebsd.org/cgi/query-pr.cgi?pr=76226 
>Unformatted:
