diff options
author | dg <dg@FreeBSD.org> | 1996-03-18 11:09:03 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1996-03-18 11:09:03 +0000 |
commit | c9c91989d463097acf614fce6e907a841ac33741 (patch) | |
tree | 2625bf9e294cdad5ed33e8592edf1e1bc029c27a /libexec/ftpd | |
parent | 126dc2f282fe92dd85232f6442674b37e81c9637 (diff) | |
download | FreeBSD-src-c9c91989d463097acf614fce6e907a841ac33741.zip FreeBSD-src-c9c91989d463097acf614fce6e907a841ac33741.tar.gz |
Fix bug that caused a coredump when attempting to enter passive mode when
not logged in. Original fix slightly altered by me to return the correct
reply code.
Submitted by: Vadim Kolontsov <vadim@tversu.ac.ru>
Diffstat (limited to 'libexec/ftpd')
-rw-r--r-- | libexec/ftpd/ftpd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index d59d805..1137d9f 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ftpd.c,v 1.13 1995/11/29 19:52:30 guido Exp $ + * $Id: ftpd.c,v 1.14 1996/01/01 08:35:11 peter Exp $ */ #ifndef lint @@ -1538,6 +1538,10 @@ passive() u_short port; char *p, *a; + if (pw == NULL) { + reply(530, "Please login with USER and PASS"); + return; + } pdata = socket(AF_INET, SOCK_STREAM, 0); if (pdata < 0) { perror_reply(425, "Can't open passive connection"); |