Re: Re: Wackamole and ProFTPd on FreeBSD
Theo Schlossnagle <[email protected]> Thu, 08 Sep 2005 13:54:37 -0400
| Newsgroups | gmane.comp.apache.mod-wackamole.general |
|---|---|
| Message-ID | <[email protected]> |
Eric L. Anderson wrote: >I did some further investigation of this by looking at the ProFTPd >source and I noticed the following comment in inet.c: > > * FreeBSD 2.2.6 (possibly other versions as well), has a security > * "feature" which disallows SO_REUSEADDR from working if the socket > * owners don't match. The easiest thing to do is simply make > * sure the socket is created as root. (Note: this "feature" seems to > * apply to _all_ BSDs.) > >I then decided to see if I could reproduce this same behavior in a >program other than ProFTPd and outside of xinetd. I then installed >tcpserver which is from /usr/ports/sysutils/ucspi-tcp. This program >fails the same way that ProFTPd does. I first ran tcpserver against a >non-wackamole managed alias and it works fine: > > # tcpserver -v -1 192.168.0.19 0 sh > 51625 > tcpserver: status: 0/40 > >I then ran tcpserver against a wackamole managed alias: > > # tcpserver -v -1 192.168.0.20 0 sh > tcpserver: fatal: unable to bind: address not available > >Looking at the source for ucspi-tcp, in socket_bind.c sets the >SO_REUSEADDR option. I am running tcpserver as user root and wackamole >is also running as user root. > >So, how do you find out the socket owners? > > It's the effective userid that called the socket() system call. Wackamole doesn't own any sockets you care about. After running wackamole, run ifconfig -a and send the output here. And include your wackamole.conf. It is most likely a wackamole misconfiguration or bug. -- // Theo Schlossnagle // Principal Engineer -- http://www.omniti.com/~jesus/ // Ecelerity: Run with it. -- http://www.omniti.com/