This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fw: problem with bindresvport assigning ports in range 600-1023


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]