Subject: Problems under Solaris 2.4...

From: [email-masked] (Homey Don't Play dat)
Date: Mon, 26 Jun 1995 08:28:51 PDT

Hi all-

        I was looking for a FAQ to search for this problem, but was unable to
locate one. Does a FAQ exist? Anyway, we're having a strange problem on our 
site with WU-ftpd 2.4(8) on a Solaris 2.4 box. It seems it doesn't always
exit when an anon user ends his/her session. As a result, we often end up
refusing anonymous connections, because they've hit their limit. Has anyone
seen this problem before?

Thanks
Steve Litras
Workgroup Research Services Manager
Autodesk, Inc.

---

From: Gregory Neil Shapiro <[email-masked]>
Date: Mon, 26 Jun 1995 11:44:54 -0400

We've seen it here as well on Alphas (DEC OSF/1) and DECstations (Ultrix).
I tracked it down to ftpd getting stuck in accept().  Here's what I did:

*** ftpd.c~	Thu Jan 05 11:16:58 1995
--- ftpd.c	Mon Jun 26 10:08:47 1995
***************
*** 71,76 ****
--- 71,77 ----
  #include <netdb.h>
  #include <errno.h>
  #include <string.h>
+ #include <unistd.h>
  #include <varargs.h>
  #ifdef SYSSYSLOG
  #include <sys/syslog.h>
***************
*** 1711,1721 ****
--- 1712,1725 ----
      else
          (void) strcpy(sizebuf, "");
      if (pdata >= 0) {
+         unsigned int oldalarm;
          struct sockaddr_in from;
          int s,
            fromlen = sizeof(from);
  
+ 	oldalarm = alarm(60 * 5);
          s = accept(pdata, (struct sockaddr *) &from, &fromlen);
+ 	alarm(oldalarm);
          if (s < 0) {
              reply(425, "Can't open data connection.");
              (void) close(pdata);

---

From: "Steven W. Litras" <[email-masked]>
Date: Tue, 27 Jun 1995 10:24:37 -0700

Thanks. I've installed this patch, and so far the problem has disappeared...

Steve

In message <[email-masked]>  writes:
::We've seen it here as well on Alphas (DEC OSF/1) and DECstations (Ultrix).
::I tracked it down to ftpd getting stuck in accept().  Here's what I did:
::
::*** ftpd.c~	Thu Jan 05 11:16:58 1995
::--- ftpd.c	Mon Jun 26 10:08:47 1995
::***************
::*** 71,76 ****
::--- 71,77 ----
::  #include <netdb.h>
::  #include <errno.h>
::  #include <string.h>
::+ #include <unistd.h>
::  #include <varargs.h>
::  #ifdef SYSSYSLOG
::  #include <sys/syslog.h>
::***************
::*** 1711,1721 ****
::--- 1712,1725 ----
::      else
::          (void) strcpy(sizebuf, "");
::      if (pdata >= 0) {
::+         unsigned int oldalarm;
::          struct sockaddr_in from;
::          int s,
::            fromlen = sizeof(from);
::  
::+ 	oldalarm = alarm(60 * 5);
::          s = accept(pdata, (struct sockaddr *) &from, &fromlen);
::+ 	alarm(oldalarm);
::          if (s < 0) {
::              reply(425, "Can't open data connection.");
::              (void) close(pdata);