From owner-freebsd-bugs Thu Nov 1 7:50: 6 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 0D48637B405 for ; Thu, 1 Nov 2001 07:50:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id fA1Fo1h10192; Thu, 1 Nov 2001 07:50:01 -0800 (PST) (envelope-from gnats) Received: from kirk.sector14.net (66-61-170-163.mtc2.cox.rr.com [66.61.170.163]) by hub.freebsd.org (Postfix) with ESMTP id A4A3937B401 for ; Thu, 1 Nov 2001 07:47:15 -0800 (PST) Received: (from dgl@localhost) by kirk.sector14.net (8.11.3/8.11.3) id fA1Fl8Q19863; Thu, 1 Nov 2001 10:47:08 -0500 (EST) (envelope-from dgl) Message-Id: <200111011547.fA1Fl8Q19863@kirk.sector14.net> Date: Thu, 1 Nov 2001 10:47:08 -0500 (EST) From: Doug Lee Reply-To: Doug Lee To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: bin/31692: 2872-or-less-byte ftp binary transfer from smbfs share produces garbage Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 31692 >Category: bin >Synopsis: 2872-or-less-byte ftp binary transfer from smbfs share produces garbage >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Nov 01 07:50:00 PST 2001 >Closed-Date: >Last-Modified: >Originator: Doug Lee >Release: FreeBSD 4.3-STABLE i386 >Organization: Bartimaeus Group, McLean, Virginia >Environment: System: FreeBSD kirk.sector14.net 4.3-STABLE FreeBSD 4.3-STABLE #5: Mon May 28 01:57:16 EDT 2001 dgl@kirk.sector14.net:/usr/obj/usr/src/sys/CUSTOM i386 Using smbfs-1.4.1 Using standard ftpd; problem does not occur when using wu-ftpd-2.6.1. >Description: Trying to ftp a short file from a mounted smbfs share using binary mode will produce garbage in the garbage file instead of a copy of the file being transferred. The garbage varies from one attempt to the next. This occurs even when using "ftp localhost." It does not occur when transferring from a UFS mount or when transferring in ASCII mode, or when the file is larger than 2872 bytes. The problem does not occur when accessing the smbfs-mounted file by other means (e.g., ex/vi, cp, or even copying to a Windows box via a Samba share). tcpdump during the corrupted ftp shows that data moves correctly from smbfs-mounted machine to FreeBSD but is incorrect by the time it leaves FreeBSD (via ftpd) for its final destination. Reproduced on two machines running different 4.3-STABLE snapshots. Transfers using wu-ftpd-2.6.1 work properly. >How-To-Repeat: Mount a Windows share via smbfs, ftp localhost on the FreeBSD box, log in and change to binary mode, and get a file of2872 bytes or less from somewhere under the smbfs mount point. Compare original and transferred files. >Fix: Workaround: Copy the needed file via means other than ftp to a UFS mount before getting it with FTP, or use a different ftpd. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message