Bug 151469 - getservbyname(3) requires NIS map services.byservicename
getservbyname(3) requires NIS map services.byservicename
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: glibc (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-18 05:57 EST by David Juran
Modified: 2007-11-30 17:07 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-06-09 07:20:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
simple test program (168 bytes, text/plain)
2005-03-18 06:01 EST, David Juran
no flags Details
strace (15.10 KB, text/plain)
2005-03-18 07:33 EST, David Juran
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Sourceware 822 None None None Never

  None (edit)
Description David Juran 2005-03-18 05:57:35 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3) Gecko/20050104 Red Hat/1.4.3-3.0.7

Description of problem:
services, as presented by our NIS server, contains the line
which is neccessary for GridEngine to work. This line is _not_ present in the local file /etc/services on all our machines
Our NIS server is very old and does not contain the NIS map services.byservicename, it only has the map services.byname. This workes fine with glibc-2.3.2-95.30 in RHEL3, but in glibc-2.3.4-2 in RHEL4, getservbyname(3) fails if the NIS map services.byservicename isn't present. The short test case works on RHEL3 but fails on RHEL4


Version-Release number of selected component (if applicable):
glibc-2.3.4-2

How reproducible:
Always

Steps to Reproduce:
1. add the line
 sge_qmaster  536/tcp  sge_commd      # Grid Engine
to your NIS server
2. stop you NIS server
2. remove the file /var/yp/<ypdomain>/services.byservicename
3. start your NIS server
4. wach the attached test case fail
  

Additional info:
Comment 1 David Juran 2005-03-18 06:00:19 EST
And the line that should be in the NIS map is
sge_qmaster  536/tcp  sge_commd      # Grid Engine

Didn't there use to be an extra screen in bugzilla were you had a chance to
correct silly mistakes before submitting a bug?
Comment 2 David Juran 2005-03-18 06:01:18 EST
Created attachment 112121 [details]
simple test program
Comment 3 Jakub Jelinek 2005-03-18 06:06:48 EST
This is supposed to depend on /etc/default/nss settings on the client.
If your /etc/default/nss file has
SERVICES_AUTHORITATIVE=TRUE
in it, then glibc assumes services.byname is present on the NIS server and
is authoritative.
If it is not present, then it ought to do a full search of the services.byname
map.
Can you check your setting?
strace output would help too.
Comment 4 David Juran 2005-03-18 07:33:37 EST
Created attachment 112122 [details]
strace

I now tried explicitly setting SERVICES_AUTHORITATIVE=FALSE but that didn't
make any difference )-:
Anyway, here is the requested trace atached.
Comment 5 David Juran 2005-03-18 07:37:30 EST
Hmmm, according to bug 101469 it seems like I have to wirte something here to
get rid of the needinfo state...
Comment 7 David Juran 2005-03-29 04:31:57 EST
I can confirm that the patch suggested by Jakub in deed seems to solve the
problem (-:
Comment 8 Petter Reinholdtsen 2005-04-05 14:09:43 EDT
We ran into this problem here at the University of Oslo, when moving one of
our conserver installations to RHEL 4.  When can we expect the fix to make it
into RHEL?
Comment 9 Jakub Jelinek 2005-04-05 15:22:40 EDT
This came too late for RHEL4 U1, so it will be fixed in RHEL4 U2.
A testing rpm from people.redhat.com might appear within a week or two,
and in RHEL4 U2 beta will be available through (beta) RHN channel.
Comment 10 Jay Hilliard 2005-06-08 21:18:04 EDT
Is a testing rpm available yet?
Comment 11 Jakub Jelinek 2005-06-09 01:51:45 EDT
This actually made it into RHEL4 U1 in the end:
* Thu May 12 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-2.9

- fix recursive dlclose (#157246, #154641, IT#72007)
- fix a typo in WINDOWS-31J charmap (#151739)
- fix NIS ypprot_err (#151469)
Comment 12 Jakub Jelinek 2005-06-09 07:20:55 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2005-096.html

Note You need to log in before you can comment on or make changes to this bug.