Bug 15628

Summary: Eterm mis-handles ^J, and also glitches with setuid operation
Product: Ports & Packages Reporter: Mark Newton <newton>
Component: Individual Port(s)Assignee: cpiazza <cpiazza>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Mark Newton 1999-12-22 15:30:01 UTC
	Much mailing list traffic has been expended on the fact that
	Eterm users who hit the return key tend to see a line like
	"load: 0.26  cmd: cat 24061 [ttyin] 0.00u 0.00s 0% 88k" instead
	of having their input line actually acted on.

	Additionally, the eterm 0.8.9 port doesn't handle setuid operation
	correctly, utmp logging doesn't work and the tty device it's running
	on doesn't get chown'ed (so biff, mesg and friends don't work).

	The patch below fixes the problem.

Fix: See the patch below.

	The patch affects src/command.c.  It seems that the Eterm 
	handling of saved setuid is bogus, or perhaps Eterm's interpretation
	of how it should work differs from our interpretation of how it
	really works :-).  I've dealt with this problem by pretending it
	doesn't exist:  If you #undef the config parameter which says
	you support saved setuid, the Eterm source will fall-back to 
	traditional UNIX setuid handling, which doesn't exhibit the same
	problems Eterm produces when it tries to used saved setuid.
	As such, "#undef HAVE_SAVED_UIDS" just after including config.h
	works-around the bug (so this isn't really a fix;  it just
	brute-force encourages Eterm to try another way to do the thing
	it's trying to do).

	The second part of the patch adds support for the VSTATUS termios
	control character to the terminal setup part of command.c.  The
	patch includes <sys/ttydefaults.h> and sets the VSTATUS character
	to CSTATUS like god intended.  This stops the annoying kerninfo
	output whenever you hit the RETURN key while the terminal is in
	canonical mode (i.e.: whenever you're running a program which expects
	to consume stdin, like "su" or "cat").  According to a quick perusal
	of the mailing list archive, people have been complaining about 
	this one since August, so it's probably about time it was fixed :-)

How-To-Repeat: 
	Install the Eterm port;  Type "cat" and hit return a few times.
	Type "mesg n" and observe the "permission denied" messages.
Comment 1 cpiazza freebsd_committer freebsd_triage 1999-12-22 19:27:52 UTC
Responsible Changed
From-To: freebsd-ports->cpiazza

I'll take this 
Comment 2 cpiazza freebsd_committer freebsd_triage 1999-12-22 19:35:34 UTC
State Changed
From-To: open->closed

Patch added, thanks a lot!