From venglin@lagoon.freebsd.org.pl Tue Mar  2 13:10:00 1999
Return-Path: <venglin@lagoon.freebsd.org.pl>
Received: from helios.man.lublin.pl (helios.man.lublin.pl [194.92.17.34])
	by hub.freebsd.org (Postfix) with ESMTP id 006A114DE5
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  2 Mar 1999 13:09:38 -0800 (PST)
	(envelope-from venglin@lagoon.freebsd.org.pl)
Received: from lagoon.freebsd.org.pl ([194.92.16.30]:4215 "EHLO lagoon.freebsd.org.pl" ident: "venglin") by helios.man.lublin.pl with ESMTP id <10350-833>; Tue, 2 Mar 1999 22:09:05 +0100
Received: (from venglin@localhost)
	by lagoon.freebsd.org.pl (8.8.8/8.8.8) id WAA24143;
	Tue, 2 Mar 1999 22:09:16 +0100 (CET)
Message-Id: <199903022109.WAA24143@lagoon.freebsd.org.pl>
Date: Tue, 2 Mar 1999 22:09:16 +0100 (CET)
From: Przemyslaw Frasunek <venglin@lagoon.freebsd.org.pl>
Reply-To: venglin@lagoon.freebsd.org.pl
To: FreeBSD-gnats-submit@freebsd.org
Subject: ftp(1) has problems with long pathnames
X-Send-Pr-Version: 3.2

>Number:         10358
>Category:       bin
>Synopsis:       ftpd(8) has problems with long pathnames
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    yar
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar  2 13:10:02 PST 1999
>Closed-Date:    Mon Feb 21 21:52:12 EST 2011
>Last-Modified:  Mon Feb 21 21:53:06 EST 2011
>Originator:     Przemyslaw Frasunek
>Release:        FreeBSD 2.2.8-STABLE i386
>Organization:
III LO
>Environment:
>Description:

ftp(1) has strange problems with long pathnames.

>How-To-Repeat:

ftp> cd blahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahbla
hblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahbl
[...]

500 'CWD blahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahbla': command not understood.
CWD command not recognized, trying XCWD.
500 'HBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAH': command not understood.
ftp> ls
500 'XCWD blahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahbl': command not understood.
500 'AHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAH': command not understood.
ftp> ls
200 PORT command successful.
200 PORT command successful.
ftp> quit
150 Opening ASCII mode data connection for '/bin/ls'.

>Fix:

unknown, i'm too lazy...

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->mikeh
Responsible-Changed-By: mikeh
Responsible-Changed-When: Wed Jun 13 21:25:43 PDT 2001
Responsible-Changed-Why:
Hrm...still getting strange problems with this, I'll look at it.

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=10358

From: "Yar Tikhiy" <yar@FreeBSD.org>
To: <freebsd-gnats-submit@FreeBSD.org>,
	<venglin@lagoon.freebsd.org.pl>
Cc:
Subject: Re: bin/10358: ftp(1) has problems with long pathnames
Date: Mon, 24 Dec 2001 22:20:50 +0300

 Does the problem still exist? I can't reproduce it in FreeBSD 4.4-STABLE.


From: "Yar Tikhiy" <yar@FreeBSD.org>
To: <freebsd-gnats-submit@FreeBSD.org>,
	<venglin@lagoon.freebsd.org.pl>, <mikeh@freebsd.org>
Cc:
Subject: Re: bin/10358: ftp(1) has problems with long pathnames
Date: Mon, 24 Dec 2001 23:25:05 +0300

 Oh, I see how to reproduce it now.

 To mikeh: The root of the problem is that a too long command won't fit
 into the ftpd parser's buffer, so it won't have trailing CR LF, so it won't
 be matched by the parser, which expects CR LF at the end. The ultimate
 solution would be to implement an "afgets" function that can read an entire
 line
 from a file or socket, no matter how long it is, by dynamically allocating
 the buffer.
 Right now I'm fiddling with the ftpd code, so you may pass this PR to me if
 you don't mind. The same about the PR misc/21494.

Responsible-Changed-From-To: mikeh->yar
Responsible-Changed-By: mikeh
Responsible-Changed-When: Mon Dec 24 12:35:28 PST 2001
Responsible-Changed-Why:
Yar has looked at this and made progress than I have so far.

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=10358

From: Mike Heffner <mheffner@novacoxmail.com>
To: Yar Tikhiy <yar@FreeBSD.org>
Cc: venglin@lagoon.freebsd.org.pl, freebsd-gnats-submit@FreeBSD.org
Subject: Re: bin/10358: ftp(1) has problems with long pathnames
Date: Mon, 24 Dec 2001 15:34:26 -0500 (EST)

 This message is in MIME format
 --_=XFMail.1.5.2.FreeBSD:20011224153426:189=_
 Content-Type: text/plain; charset=us-ascii

 Alright, no problem. I actually haven't had time to look into it in any
 depth. You might also want to check with lukemftpd, I believe when I
 originally looked at the PR it was fixed in lukemftpd. Also, lukemftpd
 will be replacing our ftpd in current, sometime in the near future, so any
 patch will probably be applicable to stable only.

 Thanks,


 On 24-Dec-2001 Yar Tikhiy wrote:
 | Oh, I see how to reproduce it now.
 |
 | To mikeh: The root of the problem is that a too long command won't fit
 | into the ftpd parser's buffer, so it won't have trailing CR LF, so it
 | won't
 | be matched by the parser, which expects CR LF at the end. The ultimate
 | solution would be to implement an "afgets" function that can read an
 | entire
 | line
 | from a file or socket, no matter how long it is, by dynamically
 | allocating
 | the buffer.
 | Right now I'm fiddling with the ftpd code, so you may pass this PR to me
 | if
 | you don't mind. The same about the PR misc/21494.


 Mike

 --
   Mike Heffner     <mheffner@[acm.]vt.edu>
   Fredericksburg, VA   <mikeh@FreeBSD.org>


 --_=XFMail.1.5.2.FreeBSD:20011224153426:189=_
 Content-Type: application/pgp-signature

 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.0.6 (FreeBSD)
 Comment: For info see http://www.gnupg.org

 iD8DBQE8J5FRFokZQs3sv5kRAj4aAJ9P/woZdPrdzC8M1lIpZb9owYGxpQCeOzzY
 /IduPBhDREt6nGfP05QCI6g=
 =m2cP
 -----END PGP SIGNATURE-----

 --_=XFMail.1.5.2.FreeBSD:20011224153426:189=_--
 End of MIME message

From: Sheldon Hearn <sheldonh@starjuice.net>
To: bug-followup@freebsd.org
Cc:
Subject: Re: bin/10358: ftp(1) has problems with long pathnames
Date: Wed, 09 Jan 2002 16:02:56 +0200

 Possibly related message sent to -bugs.

 Ciao,
 Sheldon.

 ------- Forwarded Message

 Date: Mon, 24 Dec 2001 11:09:50 -0500 (EST)
 From: Andre Guibert de Bruet <andy@siliconlandmark.com>
 To: freebsd-bugs@freebsd.org
 Subject: FreeBSD 4.4-STABLE FTPd NLIST issue
 Message-ID: <20011224104010.B96684-200000@alpha.siliconlandmark.com>

 Hello,

 I was fiddling around with 4.4-STABLE's FTP daemon for a while when I came
 across strange behavior while using the NLIST command. Please see the
 attached log for more details. The test machine was cvsup'ed and
 recompiled on December 20th. If this command is run against another
 FreeBSD machine, I happen to get errors such as:

 227 Entering Passive Mode (192,168,1,3,192,245)
 ftp: connect: Connection refused

 I'm not really familiar with the internals of the FTP protocol or the
 FreeBSD FTPd, but shouldn't issuing the NLIST command over and over return
 the same result?

 For the benefit of mailing list archive users, the log is also available
 on the web at http://siliconlandmark.com/staff/andre/ftpdnlistissue.txt

 Season's greetings!
 Andre

 > Andre Guibert de Bruet | Enterprise Software Consultant >
 > Silicon Landmark, LLC. | http://siliconlandmark.com/    >

 ------- End of Forwarded Message

State-Changed-From-To: open->closed
State-Changed-By: eadler
State-Changed-When: Mon Feb 21 21:51:23 EST 2011
State-Changed-Why:
I attempted to reproduce but was unable to do so.
Furthermore the ftpd has been updated multiple times since then

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

