Red Hat Bugzilla – Bug 203237
getservent crashes when the machine uses nis and the services map is empty (Regression).
Last modified: 2016-11-24 10:21:07 EST
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
Program received signal SIGSEGV, Segmentation fault.
0x0000002a956bfd2b in _nss_nis_getservent_r () from /lib64/libnss_nis.so.2
#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 ?? ()
This is fixed in the upstream cvs.
2006-08-19 Ulrich Drepper <firstname.lastname@example.org>
* 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.
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.
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
*** Bug 206711 has been marked as a duplicate of this bug. ***
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.