summaryrefslogtreecommitdiff
path: root/libexec/ftpd
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>1999-12-09 09:03:09 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>1999-12-09 09:03:09 +0000
commitff6cd343ebed16f011198a20f95389d9e375a3b3 (patch)
treecf6f826b041b14801ffe4c3f3ef1aa3bfb68d854 /libexec/ftpd
parent83fe5ab8ed38ab23d900d9de4e8d938d981b6248 (diff)
close passive mode data socket.
From: deraadt
Diffstat (limited to 'libexec/ftpd')
-rw-r--r--libexec/ftpd/ftpd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c
index e9c4b2446d1..97f614bfc83 100644
--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ftpd.c,v 1.63 1999/12/08 13:15:21 itojun Exp $ */
+/* $OpenBSD: ftpd.c,v 1.64 1999/12/09 09:03:08 itojun Exp $ */
/* $NetBSD: ftpd.c,v 1.15 1995/06/03 22:46:47 mycroft Exp $ */
/*
@@ -2173,6 +2173,8 @@ long_passive(char *cmd, int pf)
}
}
+ if (pdata >= 0)
+ close(pdata);
pdata = socket(ctrl_addr.su_family, SOCK_STREAM, 0);
if (pdata < 0) {
perror_reply(425, "Can't open passive connection");