[PATCH]:bindresvport should check /etc/services

H. J. Lu hjl@lucon.org
Mon Nov 25 22:47:00 GMT 2002


On Mon, Nov 25, 2002 at 09:57:37PM -0800, Ulrich Drepper wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Rajasekhar Inguva wrote:
> 
> > The glibc routine bindresvport(), in it's current implementation, randomly
> > tries to a bind to a port number in the range 600-1023.
> 
> And this is the right implementation.  If it's causing problems your
> setup is wrong.
> 

Not quite, at least the usage of bindresvport in glibc is questionable.
The problem is sunrpc calls bindresvport. Potentially, sunrpc may
grab ports in /etc/service marked for other services. I have seen that
myself. It took me a while to figure out what is going on.


H.J.



More information about the Libc-alpha mailing list