On Mon, Feb 28, 2005 at 04:29:34AM -0500, foner-stunnel@media.mit.edu wrote:
[Please keep me CC'ed on replies! I'm not on any stunnel lists.]
Stunnel 4.07 and 4.08 don't build under HPUX 10.20. 4.06 appears to build, but doesn't appear to work---with a config file like this, running on the local host:
pid = /usr/local/var/stunnel/stunnel.pid client = yes foreground = yes # debug = debug [pop3s] accept = 110 connect = our-pop-host:995
...and an attempt like this, using (for instance) Emacs 21.4a's movemail:
movemail po:foner:localhost NEWMAIL [the-password]
...I get an infinite hang. Enabling debugging causes stunnel to spit out an infinite stream of a single line at maximum rate, and seems unaffected by whether I'm trying to connect to it or not:
# stunnel test-stunnel.conf
[snip]
1900.01.00 00:00:00 LOG6[9738:0]: daemon_loop: s_poll_wait: Invalid argument (22) 1900.01.00 00:00:00 LOG6[9738:0]: daemon_loop: s_poll_wait: Invalid argument (22) 1900.01.00 00:00:00 LOG6[9738:0]: daemon_loop: s_poll_wait: Invalid argument (22) 1900.01.00 00:00:00 LOG6[9738:0]: daemon_loop: s_poll_wait: Invalid argument (22) [ . . . and forever more . . . ]
I can't imagine that this is supposed to be how debug works, since it's totally useless for debugging if it spits out the same line as fast as it can.
You can fix this particular problem by editing the src/network.c file and replacing the poll() invocation around line 128 with:
retval=poll(fds->ufds, fds->nfds, timeout<0 ? -1 : 1000*timeout);
...as it is in 4.07's network.c.
I'm not sure about the 4.07 and 4.08 build errors; I might take a closer look later on.
G'luck, Peter