Subject: bin/8504: ftpd refuses any login with error 421
To: None <gnats-bugs@gnats.netbsd.org>
From: None <p99dreyf@criens.u-psud>
List: netbsd-bugs
Date: 09/28/1999 00:55:00
>Number: 8504
>Category: bin
>Synopsis: ftpd refuses any login with error 421
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Sep 28 00:35:00 1999
>Last-Modified:
>Originator: Emmanuel Dreyfus
>Organization:
None
>Release: NetBSD/mac68k-1.4.1
>Environment:
NetBSD gizmo 1.4.1 NetBSD 1.4.1 (KERNEL) #0: Sun Sep 12 22:36:26 CEST 1999 r
oot@gizmo:/usr/src/sys/arch/mac68k/compile/KERNEL mac68k
>Description:
When there is a blank line in /etc/ftpchroot, whatever the login is,
after asking password, ftpd closes connection with error 421:
220 gizmo FTP server (Version: 7.1.0) ready.
Name (10.0.2.1:manu): manu
331 Password required for manu.
Password:
421 Service not available, remote server has closed connection.
ftp: Login failed.
ftp: No control connection for command.
ftp>
The blank line breaks the FTP service. Since this is not documented in
the ftpd man page, I do consider it as a bug.
>How-To-Repeat:
Add a blank line to /etc/ftpchroot, and try to log in.
Here was my /etc/ftpchroot file:
# $NetBSD: ftpchroot,v 1.3 1997/01/04 14:03:34 mrg Exp $
#
# list of users given ftp access to a chrooted area.
# read by ftpd(8).
#joeuser
jmg
>Fix:
I think the source fix is to be around line 1220 in
/usr/src/libexec/ftpd/dftpd.c, but since the file is not extensively
documented, I don't know exactly what is to be changed, and I will not
submit a patch myself.
>Audit-Trail:
>Unformatted: