From jrm@inferno.darktide.net  Mon Dec  2 03:04:53 2002
Return-Path: <jrm@inferno.darktide.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id E2F2E37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  2 Dec 2002 03:04:53 -0800 (PST)
Received: from inferno.darktide.net (inferno.darktide.net [203.31.37.38])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 0CB7B43E4A
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  2 Dec 2002 03:04:53 -0800 (PST)
	(envelope-from jrm@inferno.darktide.net)
Received: from inferno.darktide.net (jrm@localhost [127.0.0.1])
	by inferno.darktide.net (8.12.6/8.12.6) with ESMTP id gB2B4q7l066068
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 2 Dec 2002 21:04:52 +1000 (EST)
	(envelope-from jrm@inferno.darktide.net)
Received: (from jrm@localhost)
	by inferno.darktide.net (8.12.6/8.12.6/Submit) id gB2B4p9C066067;
	Mon, 2 Dec 2002 22:04:51 +1100 (EST)
Message-Id: <200212021104.gB2B4p9C066067@inferno.darktide.net>
Date: Mon, 2 Dec 2002 22:04:51 +1100 (EST)
From: J R Matthews <jrm@delta-e.com.au>
Reply-To: J R Matthews <jrm@delta-e.com.au>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: problems with /usr/bin/finger on some hosts
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         45914
>Category:       bin
>Synopsis:       problems with /usr/bin/finger on some hosts
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    roam
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 02 03:10:00 PST 2002
>Closed-Date:    Mon Dec 16 00:43:30 PST 2002
>Last-Modified:  Mon Dec 16 00:43:30 PST 2002
>Originator:     J R Matthews
>Release:        FreeBSD 4.7-RELEASE i386
>Organization:
Delta eSolutions
>Environment:
System: FreeBSD inferno 4.7-RELEASE FreeBSD 4.7-RELEASE #10: Thu Oct 24 01:07:37 EST 2002 root@inferno:/usr/obj/usr/src/sys/INFERNO i386

>Description:

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 ;)


>How-To-Repeat:

Try fingering an Ascend NAS.  Still, I think my above description outlines
the issue pretty obviously.

>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";
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed 
State-Changed-By: roam 
State-Changed-When: Mon Dec 2 03:22:41 PST 2002 
State-Changed-Why:  
I'll take care of this. 


Responsible-Changed-From-To: freebsd-bugs->roam 
Responsible-Changed-By: roam 
Responsible-Changed-When: Mon Dec 2 03:22:41 PST 2002 
Responsible-Changed-Why:  
I'll take care of this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=45914 
State-Changed-From-To: analyzed->patched 
State-Changed-By: roam 
State-Changed-When: Mon Dec 2 12:47:32 PST 2002 
State-Changed-Why:  
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! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=45914 
State-Changed-From-To: patched->closed 
State-Changed-By: roam 
State-Changed-When: Mon Dec 16 00:42:05 PST 2002 
State-Changed-Why:  
Merged into -STABLE in rev. 1.12.2.4 of src/usr.bin/finger/net.c. 
Thanks for helping us improve FreeBSD! 

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