Bug 76226

Summary: Default local.9600 gettytab initially uses parity
Product: Base System Reporter: Peter Jeremy <peter>
Component: confAssignee: Peter Jeremy <peterj>
Status: Closed FIXED    
Severity: Affects Only Me CC: andrew.li
Priority: Normal    
Version: 5.3-RELEASE   
Hardware: Any   
OS: Any   

Description Peter Jeremy 2005-01-13 23:00:46 UTC
	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.

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.
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.
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2012-10-18 23:56:20 UTC
Responsible Changed
From-To: freebsd-bugs->peterj

over to committer
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2012-10-18 23:56:33 UTC
State Changed
From-To: open->patched

committed
Comment 3 Peter Jeremy freebsd_committer freebsd_triage 2012-11-28 11:02:03 UTC
State Changed
From-To: patched->closed

MFC'd to 7,8,9