From owner-freebsd-bugs Wed Jan 3 6: 0:10 2001 From owner-freebsd-bugs@FreeBSD.ORG Wed Jan 3 06:00:07 2001 Return-Path: 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 1B56E37B698 for ; Wed, 3 Jan 2001 06:00:07 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f03E07j69805; Wed, 3 Jan 2001 06:00:07 -0800 (PST) (envelope-from gnats) Resent-Date: Wed, 3 Jan 2001 06:00:07 -0800 (PST) Resent-Message-Id: <200101031400.f03E07j69805@freefall.freebsd.org> Resent-From: gnats-admin@FreeBSD.org (GNATS Management) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: gnats-admin@FreeBSD.org, alo@iki.fi Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 37EF337B400 for ; Wed, 3 Jan 2001 05:58:14 -0800 (PST) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f03DwE069552; Wed, 3 Jan 2001 05:58:14 -0800 (PST) (envelope-from nobody) Message-Id: <200101031358.f03DwE069552@freefall.freebsd.org> Date: Wed, 3 Jan 2001 05:58:14 -0800 (PST) From: alo@iki.fi Sender: nobody@FreeBSD.org To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: misc/24048: natd/libalias doesn't always properly modify FTP PORT command Resent-Sender: gnats@FreeBSD.org Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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