Bug 45914 - problems with /usr/bin/finger on some hosts
Summary: problems with /usr/bin/finger on some hosts
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 4.7-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Peter Pentchev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-02 11:10 UTC by J R Matthews
Modified: 2002-12-16 08:43 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description J R Matthews 2002-12-02 11:10:00 UTC
I just upgraded a myriad of my systems from 4.6R-p2 to 4.7 and
lo-and-behold I could no longer use /usr/bin/finger to get a finger from
remote Ascend NAS.

Funnily enough, it still worked on remote Cisco and unix boxen.

Still - i got shitty with it, and dug into the problem.

In 4.6R there was no INET6 support - 4.7 onwards now has it and someone
just very simply screwed up typing in the new code, as you'll plainly see.

Old Code snippet from net.c

	iov[msg.msg_iovlen].iov_base = "\r\n";

New code snippet from net.c

	static char neteol[] = "\n\r";
	.
	.
	.
	iov[msg.msg_iovlen].iov_base = neteol;

Well, it's pretty obvious what the problem now isnt it? :)

And, of course - changing it to the old behavior of "\r\n" does fix it and
my problems are no more.

I can submit a patch to fix this if you want or not.. I honestly dont give
a damn to be honest ;)

Fix: 

Obvious - alter net.c in usr.bin/finger so that instead of

	static char neteol[] = "\n\r";

We have instead

	static char neteol[] = "\r\n";
How-To-Repeat: 
Try fingering an Ascend NAS.  Still, I think my above description outlines
the issue pretty obviously.
Comment 1 Peter Pentchev freebsd_committer freebsd_triage 2002-12-02 11:22:41 UTC
State Changed
From-To: open->analyzed

I'll take care of this. 


Comment 2 Peter Pentchev freebsd_committer freebsd_triage 2002-12-02 11:22:41 UTC
Responsible Changed
From-To: freebsd-bugs->roam

I'll take care of this.
Comment 3 Peter Pentchev freebsd_committer freebsd_triage 2002-12-02 20:47:32 UTC
State Changed
From-To: analyzed->patched

Fix committed to -current, src/usr.bin/finger/net.c rev. 1.22; 
it will be merged into -stable in two weeks' time. 

Thanks for alerting us about this problem!
Comment 4 Peter Pentchev freebsd_committer freebsd_triage 2002-12-16 08:42:05 UTC
State Changed
From-To: patched->closed

Merged into -STABLE in rev. 1.12.2.4 of src/usr.bin/finger/net.c. 
Thanks for helping us improve FreeBSD!