Both Solaris 2.4's ftpd and wu-ftpd have a fundamental program.
This was pointed out by Casper Dik (casper@Holland.Sun.COM) and
he provided a patch (included).
Original post
> >I have a well running Solaris 2.4 system with a single problem.
> >
> >The sharp-eyed readers of this list will note that this is the
> >second message in as many days, and that doesn't portend a well
> >running system, but the first message was quickly resolved and
> >turned out to be a mangled /etc/lp/Systems file that admintool
> >had done a digital two-step on.
> >
> >This system is tied to the net through a service provider and
> >evertyhing is running smoothly. It's purpose in life is to
> >deliver up to date information to our customers through ftp,
> >http, and e-mail. It is doing that well, except for one small
> >problem. Sun's ftpd wouldn't die off when an anonymous user
> >logged off, so I found and compiled wu-ftpd-2.4. The compilation
> >went smoothly and I figured that the problem was solved.
> >
> >Not so. It still leaves process and stick around indefinitely.
> >
> >It must have something to do with the ~ftp/dev or ~ftp/bin
> >directories, or permissions, but I haven't got a clue! Everthing
> >functions normally for ftp sessions.
The solution
> The most likely cause of your trouble is netscape users (or
> any other passive mode FTP clients) Both wu-ftpd and Sun ftpd
> have the same bug: when waiting to accept a passive connection,
> they never time out.
>
> (When using truss on the hanging ftpds you'll find them in getmsg()).
>
>
>
> Casper
>
> Here's a patch:
*** ftpd.c.org Thu Apr 14 22:05:35 1994
--- ftpd.c Mon Nov 21 19:40:59 1994
***************
*** 1710,1717 ****
--- 1710,1731 ----
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;
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:29 CDT