Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/ftpd close data socket when new EPRT command comes.



details:   https://anonhg.NetBSD.org/src/rev/58554d85b318
branches:  trunk
changeset: 474247:58554d85b318
user:      itojun <itojun%NetBSD.org@localhost>
date:      Fri Jul 02 07:11:36 1999 +0000

description:
close data socket when new EPRT command comes.

diffstat:

 libexec/ftpd/ftpcmd.y |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 0eef10d898c8 -r 58554d85b318 libexec/ftpd/ftpcmd.y
--- a/libexec/ftpd/ftpcmd.y     Fri Jul 02 06:32:32 1999 +0000
+++ b/libexec/ftpd/ftpcmd.y     Fri Jul 02 07:11:36 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ftpcmd.y,v 1.32 1999/07/02 05:52:14 itojun Exp $       */
+/*     $NetBSD: ftpcmd.y,v 1.33 1999/07/02 07:11:36 itojun Exp $       */
 
 /*
  * Copyright (c) 1985, 1988, 1993, 1994
@@ -47,7 +47,7 @@
 #if 0
 static char sccsid[] = "@(#)ftpcmd.y   8.3 (Berkeley) 4/6/94";
 #else
-__RCSID("$NetBSD: ftpcmd.y,v 1.32 1999/07/02 05:52:14 itojun Exp $");
+__RCSID("$NetBSD: ftpcmd.y,v 1.33 1999/07/02 07:11:36 itojun Exp $");
 #endif
 #endif /* not lint */
 
@@ -370,7 +370,10 @@
                        }
                        free(tmp);
                        tmp = NULL;
-
+                       if (pdata >= 0) {
+                               (void) close(pdata);
+                               pdata = -1;
+                       }
                        reply(200, "EPRT command successful.");
                eprt_done:;
                }



Home | Main Index | Thread Index | Old Index