<x-flowed>
Greetings,
Yes, I have had the same problem with ftp.proxy not working for ftp servers
which have a none standard greeting, ie one which prints out the whole ISP
upload rules etc. I had not come up with a solution but I will be trying out
what you showed below.
Regards
Richard
At 12:18 03/10/02 +0100, you wrote:
>Hi,
>
>We have been using ftp.proxy for some time now, but recently I found
>that I could not get access to a particular site. I upgraded to the
>latest version (1.1.5), but still no joy. On further investigation I
>found this to be caused by the server greeting being issued by the site.
>Here is the greeting:
>
> 220-Serv-U FTP Server v4.0 for WinSock ready...
> 220-
> 220-If you receive a "home directory does not exist" error,
> 220-or other unexpected error please call xxxxxxx
> 220-and ask for "NT Support"
> 220
> USER xxxxxxx
> 331 User name okay, need password.
>
>This works ok with 'normal' ftp clients, but ftp.proxy gets stuck in
>dologin waiting for the end of the server greeting. This is because the
>last line of the greeting in this instance is '220<space><lf>'. The
>offending code snippet is:
>
>//--------------------ftp.c : int dologin(ftp_t *x) -----------------
>
> sfgets(x, line, sizeof(line));
> while (line[3] != ' ') {
> if (sfgets(x, line, sizeof(line)) == NULL) {
> syslog(LOG_NOTICE, "-ERR: lost server while
>reading client greeting: %s", x->server.name);
> exit (1);
> }
> }
>
> if (atoi(line) != 220) {
> cfputs(x, "500 service unavailable");
> syslog(LOG_NOTICE, "-ERR: unexpected server greeting:
>%s", line);
> exit (1);
> }
>//--------------------------------------------------
>
>The problem is that sfgets function removes control characters and
>spaces at the end of a line. So server greetings that end without any
>text after the space on the last line are not recognised. As a quick fix
>I just changed the condition to:
>
> while (line[3] == '-') {
>
>but I don't know if this is totally safe. After putting this fix in
>everything seems to work fine.
>
>I am not sure who is at fault here - I would welcome comments from
>anyone about whether the above server greeting is 'non-standard' or if
>maybe this issue has already been seen by others. As far as I can see
>there is nothing to stop people using such a format.
>
>
>Martin Holmes
</x-flowed>
From [EMAIL PROTECTED] Fri Oct 04 13:05:18 2002
X-Persona: <Compucation>
Return-path: <[EMAIL PROTECTED]>
Received: from mailx.cdac.ernet.in ((mailx.cdacindia.com) [202.54.40.35])
by compucation.de ([213.185.64.44])
with SMTP (MDaemon.PRO.v6.0.7.R)
for <[EMAIL PROTECTED]>; Fri, 04 Oct 2002 13:02:30 +0200
Date: Fri, 4 Oct 2002 16:29:30 +0530 (IST)
From: Sunil Pandya <[EMAIL PROTECTED]>
To: "Andreas Schoenberg" <[EMAIL PROTECTED]>
Subject: [general-l] Problem is acp {01}
Message-ID: <[EMAIL PROTECTED]>
MIME-Version: 1.0
X-Lookup-Warning: HELO lookup on mailx.cdac.ernet.in does not match 202.54.40.35
X-MDRcpt-To: [EMAIL PROTECTED]
X-MDRemoteIP: 202.54.40.35
Sender: [EMAIL PROTECTED]
X-Return-Path: [EMAIL PROTECTED]
Precedence: bulk
List-Unsubscribe: <mailto:[EMAIL PROTECTED]>
X-MDMailing-List: [EMAIL PROTECTED]
X-MDSend-Notifications-To: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
X-MDRedirect: 1
X-MDaemon-Deliver-To: [EMAIL PROTECTED]
X-Eudora2Unix: 3905-11-05T08:39:35Z converted
Hello
I am having problem in applying access control using the ftp proxy server.
Can u pls help me.
Regards
Sunil