This service will be undergoing non-disruptive maintenance at 07:20 UTC, 2018-12-14. It is expected to last approximately 30 minutes
Bug 151469 - getservbyname(3) requires NIS map services.byservicename
Summary: getservbyname(3) requires NIS map services.byservicename
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: glibc (Show other bugs)
(Show other bugs)
Version: 4.0
Hardware: All Linux
Target Milestone: ---
: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2005-03-18 10:57 UTC by David Juran
Modified: 2007-11-30 22:07 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-06-09 11:20:55 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
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 11:01 UTC, David Juran
no flags Details
strace (15.10 KB, text/plain)
2005-03-18 12:33 UTC, David Juran
no flags Details

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

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):

How reproducible:

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
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
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]

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 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 <> 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.

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