Greetings.<br>I'm running the stock stunnel 4.21 on Ubuntu 8.04 (version and configs listed below) as a stand-alone daemon to pass connections between ssl-enabled SMTP, POP3, and IMAP clients and their respective servers, which run on the same machine as stunnel. In previous instances of Stunnel (v4.15) I've managed to successfully get the daemon to switch to a non-root user and use only a single process. I now find, however, that I get 6 processes and 5 continue to run as root with only one (albeit the one listening on the specified sockets) switching down to the specified user. Does anyone have any idea why I both can't set uid/gid and why I've now got so many processes?<br>
# ps aux | grep stunnel<br>root 22702 0.0 0.1 3604 428 pts/1 S 11:24 0:00 /usr/bin/stunnel4 /etc/stunnel/stunnel.conf<br>root 22703 0.0 0.1 3604 428 pts/1 S 11:24 0:00 /usr/bin/stunnel4 /etc/stunnel/stunnel.conf<br>
root 22704 0.0 0.1 3604 428 pts/1 S 11:24 0:00 /usr/bin/stunnel4 /etc/stunnel/stunnel.conf<br>root 22705 0.0 0.1 3604 428 pts/1 S 11:24 0:00 /usr/bin/stunnel4 /etc/stunnel/stunnel.conf<br>
root 22706 0.0 0.1 3604 428 pts/1 S 11:24 0:00 /usr/bin/stunnel4 /etc/stunnel/stunnel.conf<br>stunnel4 22707 0.0 0.2 3720 932 ? Ss 11:24 0:00 /usr/bin/stunnel4 /etc/stunnel/stunnel.conf<br>
<br># lsof -i | grep stunnel<br>stunnel4 22707 stunnel4 11u IPv4 55934 TCP emily:pop3s (LISTEN)<br>stunnel4 22707 stunnel4 12u IPv4 55935 TCP emily:imaps (LISTEN)<br>stunnel4 22707 stunnel4 13u IPv4 55936 TCP emily:ssmtp (LISTEN)<br>
<br>I'm invoking stunnel simply as /usr/sbin/stunnel4 /etc/stunnel4/stunnel.conf:<br><br>cert = /etc/stunnel/stunnel.pem<br>sslVersion = SSLv3<br>chroot = /var/lib/stunnel4/<br>setuid = stunnel4<br>setgid = stunnel4<br>
pid = /stunnel4.pid<br>socket = l:TCP_NODELAY=1<br>socket = r:TCP_NODELAY=1<br>[pop3s]<br>accept = <a href="http://64.5.53.172:995">64.5.53.172:995</a><br>connect = <a href="http://64.5.53.172:110">64.5.53.172:110</a><br>
[imaps]<br>accept = <a href="http://64.5.53.172:993">64.5.53.172:993</a><br>connect = <a href="http://64.5.53.172:143">64.5.53.172:143</a><br>[ssmtp]<br>accept = <a href="http://64.5.53.172:465">64.5.53.172:465</a><br>connect = <a href="http://64.5.53.172:25">64.5.53.172:25</a><br>
<br>Version Info:<br>stunnel 4.21 on i486-pc-linux-gnu with OpenSSL 0.9.8g 19 Oct 2007<br>Threading:PTHREAD SSL:ENGINE Sockets:POLL,IPv6 Auth:LIBWRAP<br><br>Global options<br>debug = 5<br>pid = /var/run/stunnel4.pid<br>
RNDbytes = 64<br>RNDfile = /dev/urandom<br>RNDoverwrite = yes<br><br>Service-level options<br>cert = /etc/stunnel/stunnel.pem<br>ciphers = AES:ALL:!aNULL:!eNULL:+RC4:@STRENGTH<br>key = /etc/stunnel/stunnel.pem<br>
session = 300 seconds<br>sslVersion = SSLv3 for client, all for server<br>TIMEOUTbusy = 300 seconds<br>TIMEOUTclose = 60 seconds<br>TIMEOUTconnect = 10 seconds<br>TIMEOUTidle = 43200 seconds<br>verify = none<br>
<br>