Date: Thu, 9 Apr 1998 19:59:25 -0700 (PDT) From: Archie Cobbs <archie@whistle.com> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: bin/6259: ftpPassive() function in libftpio(3) is broken Message-ID: <199804100259.TAA03296@bubba.whistle.com>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804100259.TAA03296>
