This is the mail archive of the glibc-bugs@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]

[Bug libc/456] New: bindresvport() may ports reserved by other services...


I got problem with the rndc command from BIND, the problem was that named
coulnd't allocate (listen to) port 953 as sepecified in /etc/services. It turned
out that rpc.rquotad had started to use port 953. So, I wondered why is
rpc.rquotad using port 953, when it is reserved in /etc/services to rndc?

It turned out that rpc.rquotad found its rpc protocol in /etc/rpc, with the
following line:
rquotad    100011  rquotaprog quota rquota

But nither of rquotad, rquotaporg quota or rquota existed in /etc/services, so
rpc.rquotad called:
svctcp_create(RPC_ANYSOCK, 0,0)

svctcp_create will then in turn create a new socket and bind that port using
bindresvport(sock, &addr).

bindresvport will then bind the port according to it's magic.

But unfortinally bindresvport's magic doesnt take /etc/services into account, so
 in my case bindresvport selected port 953, resulting in named failing to
allocate it's control port rndc.

Shouldn't bindresvport instead of just limiting its portrange from 600 <= port <
1024 to at least check the port with getservbyport and ensure that the port
isn't allready allocated by another service.

I would gladly help to implement a frendlier bindresvport().

Regards
  Mattias Grönlund

-- 
           Summary: bindresvport() may ports reserved by other services...
           Product: glibc
           Version: 2.3.3
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: gotom at debian dot or dot jp
        ReportedBy: Mattias dot glibc at Gronlund dot net
                CC: glibc-bugs at sources dot redhat dot com


http://sources.redhat.com/bugzilla/show_bug.cgi?id=456

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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