[tpop3d-discuss] tpop3d hanging at prompt
Chris Lightfoot
chris at ex-parrot.com
Tue, 11 Nov 2003 19:14:56 +0000
On Tue, Nov 11, 2003 at 01:06:30PM -0600, Larry Chancy wrote:
> Right now I see 104 people with an established connection to port 110 but only 3 child processes. It looks like most of these are probably waiting for the initial +OK banner.
It is *just* possible that tpop3d is consuming your
system's entire supply of entropy (really) by trying to
read from /dev/urandom to create a server timestamp for
each request. (Not likely, but possible, and doesn't
explain the 99% load thing.)
Can you try, as a test, this patch:
diff -u -r1.52 connection.c
--- connection.c 6 Nov 2003 01:19:27 -0000 1.52
+++ connection.c 11 Nov 2003 19:14:21 -0000
@@ -60,7 +60,7 @@
if (!s) return NULL;
memset(s, 0, l);
*s = '<';
-
+#if 0
/* Get random "timestamp" data. */
fd = open("/dev/urandom", O_RDONLY);
if (fd != -1) {
@@ -69,7 +69,7 @@
while (n == -1 && errno == EINTR);
close(fd);
}
-
+#endif
if (n != sizeof(buffer)) {
/* OK, we need to get some pseudo-random data from rand(3).
* FIXME This is bad from a security PoV, and should be replaced by
--
Commitment can be best illustrated by a breakfast of ham and eggs.
The chicken was involved, the pig was committed. (unknown origin)