From owner-freebsd-bugs Thu Apr 9 20:10:03 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA12859 for freebsd-bugs-outgoing; Thu, 9 Apr 1998 20:10:03 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: (from gnats@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA12849; Thu, 9 Apr 1998 20:10:01 -0700 (PDT) (envelope-from gnats) Received: from whistle.com (s205m131.whistle.com [207.76.205.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA11203 for ; Thu, 9 Apr 1998 20:00:26 -0700 (PDT) (envelope-from archie@whistle.com) Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id TAA04344 for ; Thu, 9 Apr 1998 19:59:51 -0700 (PDT) Received: from bubba.whistle.com(207.76.205.7) by whistle.com via smap (V1.3) id sma004342; Thu Apr 9 19:59:25 1998 Received: (from archie@localhost) by bubba.whistle.com (8.8.7/8.6.12) id TAA03296; Thu, 9 Apr 1998 19:59:25 -0700 (PDT) Message-Id: <199804100259.TAA03296@bubba.whistle.com> Date: Thu, 9 Apr 1998 19:59:25 -0700 (PDT) From: Archie Cobbs Reply-To: archie@whistle.com To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/6259: ftpPassive() function in libftpio(3) is broken Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 6259 >Category: bin >Synopsis: ftpPassive() function in libftpio(3) is broken >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Apr 9 20:10:01 PDT 1998 >Last-Modified: >Originator: Archie Cobbs >Organization: Whistle Communications, Inc. >Release: FreeBSD 2.2.6-BETA i386 >Environment: FreeBSD 2.2-stable >Description: The ftpPassive() function returns successful even if the remote ftp server does not support passive mode. The ftpPassive() function does not look for the right return code after the PASV command. >How-To-Repeat: Call ftpPassive() function while connected to an ftp server that doesn't support passive mode. Notice return value is successful. >Fix: 1. cd /usr/src/lib/libftpio 2. Apply patch: Index: ftpio.c =================================================================== RCS file: /cvs/freebsd/src/lib/libftpio/ftpio.c,v retrieving revision 1.15.2.5 diff -c -r1.15.2.5 ftpio.c *** ftpio.c 1998/02/17 20:04:33 1.15.2.5 --- ftpio.c 1998/04/10 02:56:04 *************** *** 324,331 **** if (ftp->is_passive == st) return SUCCESS; i = cmd(ftp, "PASV"); ! if (i < 0) ! return i; ftp->is_passive = !ftp->is_passive; return SUCCESS; } --- 324,331 ---- if (ftp->is_passive == st) return SUCCESS; i = cmd(ftp, "PASV"); ! if (i != FTP_PASSIVE_HAPPY) ! return FAILURE; ftp->is_passive = !ftp->is_passive; return SUCCESS; } >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message