This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Fw: problem with bindresvport assigning ports in range 600-1023
- From: Mark Brown <bmark at us dot ibm dot com>
- To: libc-alpha at sources dot redhat dot com
- Date: Thu, 23 Jan 2003 15:15:38 -0600
- Subject: Fw: problem with bindresvport assigning ports in range 600-1023
- Reply-to: bmark at us dot ibm dot com
Michael Schmidt writes:
> My question is, if the assertion that bindresvport can randomly grab a
port
> in the range 600-1023 is true, then why does the Internet Assigned
Numbers
> Authority (IANA) bother to assign port numbers in this range? Once a
> service has such an assigned port number, the service expects to be able
to
> bind to it so its clients can find it at that port number. The problem
we
> saw is that another program grabbed the assigned port first by calling
> bindresvport.
>
> What am I missing?
As has been pointed out here, under the scheme that was proposed no port
will be
found, if somebody uses the /etc/services file from IANA. All ports below
1023
are officially registered. There is no port reserved for RPC!
Notice that bindresvport() is only useable by root, supposedly "root"
knows what
it is doing when it tries for a port under 1024.
Here is a thread that also discusses this, from a kernel POV:
http://www.uwsg.iu.edu/hypermail/linux/kernel/0211.2/0023.html
(consensus: fix the offending apps.)
-------------------
Mark S. Brown
Senior Technical Staff Member, IBM Server Group
bmark@us.ibm.com