Bug 151469

Summary: getservbyname(3) requires NIS map services.byservicename
Product: Red Hat Enterprise Linux 4 Reporter: David Juran <djuran>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: goeran, jay.hilliard, pere, t.h.amundsen
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-06-09 11:20:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
simple test program
none
strace none

Description David Juran 2005-03-18 10:57:35 UTC
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 11:00:19 UTC
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 11:01:18 UTC
Created attachment 112121 [details]
simple test program

Comment 3 Jakub Jelinek 2005-03-18 11:06:48 UTC
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 12:33:37 UTC
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 12:37:30 UTC
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 09:31:57 UTC
I can confirm that the patch suggested by Jakub in deed seems to solve the
problem (-:

Comment 8 Petter Reinholdtsen 2005-04-05 18:09:43 UTC
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 19:22:40 UTC
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-09 01:18:04 UTC
Is a testing rpm available yet?

Comment 11 Jakub Jelinek 2005-06-09 05:51:45 UTC
This actually made it into RHEL4 U1 in the end:
* Thu May 12 2005 Jakub Jelinek <jakub> 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 11:20:55 UTC
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