Subject: Re: newbie question

From: Keith Christopher <[email-masked]>
Date: Mon, 06 Mar 1995 12:30:26 -0500 (EST)

It seems that wu-ftp is not killing inactive sessions. i.e. I am full and 
it's not killing old or logged off sessions`. Is there a patch fix for 
this ?

Keith Christopher
Welch Medical Library
Unix System Adminstrator
---
http://tomahawk.welch.jhu.edu/keithc.html
---
Who died and made you root@everywhere?
---

---

From: Vidiot <[email-masked]>
Date: Mon, 06 Mar 1995 13:37:01 -0600 (CST)

Keith:

<It seems that wu-ftp is not killing inactive sessions. i.e. I am full and 
<it's not killing old or logged off sessions`. Is there a patch fix for 
<this ?

Attached below is the patch that I have for use with SunOS 4.1.3.  It is
supposed to work, but I have caught a few still hanging around and don't
know why.  They are few and far between.

MB
-- 
System Administrator - Extrel FTMS - Madison WI.
e-mail: [email-masked]
phone: (608) 273-8262  fax: (608) 273-8719  voice-mail: (800) 426-6488 ext 6293
Visit - http://www.ftms.com/vidiot/  (Your link to the world of Star Trek)

*** ftpd.c.orig	Wed Apr 13 16:17:18 1994
--- ftpd.c	Fri Nov 25 14:22:10 1994
***************
*** 77,83 ****
  #else
  #include <syslog.h>
  #endif
! #include <time.h>
  #include "conversions.h"
  #include "extensions.h"
  #include "pathnames.h"
--- 77,83 ----
  #else
  #include <syslog.h>
  #endif
! #include <sys/time.h>
  #include "conversions.h"
  #include "extensions.h"
  #include "pathnames.h"
***************
*** 1707,1714 ****
--- 1707,1728 ----
          int s,
            fromlen = sizeof(from);
  
+ #ifdef FD_ZERO
+ 	struct timeval timeout;
+ 	fd_set set;
+ 
+ 	FD_ZERO(&set);
+ 	FD_SET(pdata, &set);
+ 
+ 	timeout.tv_usec = 0;
+ 	timeout.tv_sec = 120;
+ 
+ 	if (select(pdata+1, &set, (fd_set *) 0, (fd_set *) 0, &timeout) == 0 ||
+ 	    (s = accept(pdata, (struct sockaddr *) &from, &fromlen)) < 0) {
+ #else
          s = accept(pdata, (struct sockaddr *) &from, &fromlen);
          if (s < 0) {
+ #endif
              reply(425, "Can't open data connection.");
              (void) close(pdata);
              pdata = -1;

---

From: Keith Christopher <[email-masked]>
Date: Mon, 06 Mar 1995 14:41:29 -0500 (EST)

Thanks!

Keith Christopher
Welch Medical Library
Unix System Adminstrator
---