From kattyo@abk.nu  Sun Jun 16 01:56:05 2002
Return-Path: <kattyo@abk.nu>
Received: from atg-smtp1.t-com.ne.jp (atg-smtp1.t-com.ne.jp [61.211.178.68])
	by hub.freebsd.org (Postfix) with ESMTP
	id 6421737B403; Sun, 16 Jun 2002 01:56:04 -0700 (PDT)
Received: from myhost (217.net218219036.t-com.ne.jp [218.219.36.217])
	by atg-smtp1.t-com.ne.jp (8.11.4/3.7W-02051213) with SMTP id g5G8u2S25691;
	Sun, 16 Jun 2002 17:56:02 +0900 (JST)
Message-Id: <200206160856.g5G8u2S25691@atg-smtp1.t-com.ne.jp>
Date: Sun, 16 Jun 2002 17:56:02 +0900 (JST)
From: kattyo@abk.nu
To: FreeBSD-gnats-submit@freebsd.org
Cc: dan@FreeBSD.org
Subject: ftpd(8) cannot NLST with options in some conditions
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         39362
>Category:       bin
>Synopsis:       ftpd(8) cannot NLST with options in some conditions
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    dan
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 16 02:00:03 PDT 2002
>Closed-Date:    Tue Jul 02 19:58:26 PDT 2002
>Last-Modified:  Tue Jul 02 19:58:26 PDT 2002
>Originator:     TANAKA Hiroyuki
>Release:        FreeBSD 4.6-RC i386
>Organization:
Nippon Insitutit of Technology
>Environment:
System: FreeBSD konpeito.local 4.6-RC FreeBSD 4.6-RC #1: Wed May 22 22:13:44 JST 2002 root@konpeito.local:/usr/src/sys/compile/konpeito i386

	and /usr/libexec/ftpd

>Description:
	ftpd(8) fail NLST command with following conditions:

		1. previous data file transfer was
				regular file
				in binary mode (TYPE I or TYPE L)
				and transfered successfuly
		2. NLST with any options:
				ex. NLST -a

	This bug may be appered in rev.1.72, changing file transfer to 
	 use mmap.

>How-To-Repeat:
	% ftp localhost
	Name (localhost: anonymous): foo
	Password: 
	ftp> bin
	ftp> get a-exist-file
	ftp> nlist -a

>Fix:

--- orig/ftpd.c	Sun Jun 16 10:44:16 2002
+++ ftpd.c	Sun Jun 16 10:46:04 2002
@@ -1820,6 +1820,7 @@
 				}
 			}
 
+			transflag = 0;
 			reply(226, "Transfer complete.");
 			return (0);
 		}

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->dan 
Responsible-Changed-By: dan 
Responsible-Changed-When: Sun Jun 16 11:59:18 PDT 2002 
Responsible-Changed-Why:  

If my commit broke it, then looks like I have to fix it. :) 


http://www.freebsd.org/cgi/query-pr.cgi?pr=39362 
State-Changed-From-To: open->closed 
State-Changed-By: dan 
State-Changed-When: Tue Jul 2 17:10:33 PDT 2002 
State-Changed-Why:  

Fix commited to -CURRENT.  Thanks! 


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