Date: Wed, 3 Jan 2001 05:58:14 -0800 (PST) From: alo@iki.fi To: freebsd-gnats-submit@FreeBSD.org Subject: misc/24048: natd/libalias doesn't always properly modify FTP PORT command Message-ID: <200101031358.f03DwE069552@freefall.freebsd.org> Resent-Message-ID: <200101031400.f03E07j69805@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 24048
>Category: misc
>Synopsis: natd/libalias doesn't always properly modify FTP PORT command
>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: Wed Jan 03 06:00:06 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Antti Louko
>Release: 4.1-RELEASE
>Organization:
>Environment:
(modified)
FreeBSD xxx.aaa.com 4.1-RELEASE FreeBSD 4.1-RELEASE #1: Thu Nov 16 15:24:02 EET 2000 root@xxx.aaa.com:/usr/src/sys/compile/FOOBAR i386
>Description:
natd (actually libalias/alias_db.c) only modifies FTP PORT commands
if they are immediately in the beginning of a new line.
This is implemented by having a flag which is set when a CR/LF
pair is detected. This works well except when PORT command
happens to be first command in the FTP session.
This is the case eg. with certain banking related application.
>How-To-Repeat:
Use ftp client which send PORT command as its first command over
the command channel.
>Fix:
Initialize CRLF flag in the beginnig of the alias association.
Flag name should be modified to something like
"IN_THE_BEGINNING_OF_A_LINE".
*** /usr/src/lib/libalias/alias_db.c Tue Jun 27 19:44:13 2000
--- /home/alo/src/libalias/alias_db.c Tue Jan 2 11:28:29 2001
***************
*** 901,907 ****
link->server = NULL;
link->link_type = link_type;
link->sockfd = -1;
! link->flags = 0;
link->timestamp = timeStamp;
/* Expiration time */
--- 901,907 ----
link->server = NULL;
link->link_type = link_type;
link->sockfd = -1;
! link->flags = LINK_LAST_LINE_CRLF_TERMED;
link->timestamp = timeStamp;
/* Expiration time */
>Release-Note:
>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?200101031358.f03DwE069552>
