Bug 203237

Summary: getservent crashes when the machine uses nis and the services map is empty (Regression).
Product: Red Hat Enterprise Linux 4 Reporter: Kostas Georgiou <k.georgiou>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: low Docs Contact:
Priority: medium    
Version: 4.4CC: drepper, fweimer, gbailey, gunther.mayer, kgrindley
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0210 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-01 23:05:11 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:

Description Kostas Georgiou 2006-08-19 17:58:07 UTC
It seems that getservent is broken when it's used with nis and an empty services
map. Here is a stack trace from tcpdump (if someone can point me to the
debuginfo rpms which for some reason don't exist in rhn I can get full trace).
Adding some services in the nis map solves the crash.

# gdb tcpdump
(gdb) run
Program received signal SIGSEGV, Segmentation fault.
0x0000002a956bfd2b in _nss_nis_getservent_r () from /lib64/libnss_nis.so.2
(gdb) where
#0  0x0000002a956bfd2b in _nss_nis_getservent_r () from /lib64/libnss_nis.so.2
#1  0x0000003d586d6c70 in __nss_getent_r () from /lib64/tls/libc.so.6
#2  0x0000003d586dc8ef in getservent_r@@GLIBC_2.2.5 () from /lib64/tls/libc.so.6
#3  0x0000003d586d68b6 in __nss_getent () from /lib64/tls/libc.so.6
#4  0x0000003d586dc682 in getservent () from /lib64/tls/libc.so.6
#5  0x0000000000403c0a in ?? ()
#6  0x0000000000435dd6 in ?? ()
#7  0x0000003d5861c3fb in __libc_start_main () from /lib64/tls/libc.so.6
#8  0x0000000000402bda in ?? ()
#9  0x0000007fbffff908 in ?? ()
#10 0x000000000000001c in ?? ()
#11 0x0000000000000001 in ?? ()
#12 0x0000007fbffffb2b in ?? ()
#13 0x0000000000000000 in ?? ()
(gdb) quit

Comment 1 Ulrich Drepper 2006-08-19 18:27:30 UTC
This is fixed in the upstream cvs.

Comment 2 Jakub Jelinek 2006-08-21 09:30:18 UTC
2006-08-19  Ulrich Drepper  <drepper>

        * nis/nss_nis/nis-service.c (internal_nis_getservent_r): . If map
        is empty simply return and use next service.
        * nis/nss_nis/nis-rpc.c (internal_nis_getrpcent_r): Likewise.


Comment 3 Kostas Georgiou 2006-08-21 09:55:09 UTC
I guess this is going to be a U5 fix then? The work around is simple enough so I
doupt that anyone will need a fix urgently.

Comment 6 RHEL Program Management 2006-09-07 21:46:12 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 8 Martin Stransky 2006-09-22 09:59:08 UTC
*** Bug 206711 has been marked as a duplicate of this bug. ***

Comment 13 Red Hat Bugzilla 2007-05-01 23:05:11 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-2007-0210.html