Bug 97415 - Core dumps with ldap hosts query when local ip address is not in /etc/hosts
Summary: Core dumps with ldap hosts query when local ip address is not in /etc/hosts
Status: CLOSED CANTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: nss_ldap
Version: 9
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact: Jay Turner
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-06-15 02:11 UTC by Mathias Fröhlich
Modified: 2015-01-08 00:05 UTC (History)
2 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2007-01-02 19:02:04 UTC


Attachments (Terms of Use)

Description Mathias Fröhlich 2003-06-15 02:11:10 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.7 (X11; Linux i686; U;) Gecko/20030131

Description of problem:
When using the hosts database of an ldap server in the name service switch with
the /etc/nsswitch.conf line

hosts: files ldap dns

and the ip address of the local host (not localhost but `hostname`) is not in
/etc/hosts, many binaries will crash.
Commands that crash are for example
getent hosts
 (it crashes with the first ldap hosts entry)
bash
 (not neat, because then you can not log in anymore if the bug triggers)
vi
 (also not neat, because you can't reedit /etc/nsswitch.conf if the bug triggers)



Version-Release number of selected component (if applicable):
nss_ldap-202-5

How reproducible:
Always

Steps to Reproduce:
1. echo "127.0.0.1 localhost localhost.localdomain" > /etc/hosts
2. cp /etc/nsswitch.conf /etc/nsswitch.conf.works
3. sed -e 's,^hosts:.*$,hosts: files ldap dns,g' /etc/nsswitch.conf.works >
/etc/nsswitch.conf
4. getent hosts
    

Actual Results:  coredump

Expected Results:  print content of hosts database

Additional info:

So be carefull when testing it is best to keep either a working /etc/hosts.works
and/or a working /etc/nsswitch.conf.works somwhere. The command

cp /etc/nsswitch.conf.works /etc/nsswitch.conf

does't trigger the bug. :-)

Comment 1 Mathias Fröhlich 2003-06-16 17:09:39 UTC
Ok, have hacked myself. 
 
I have a fix ready. It works on Linux. 
 
The patch is also submitted to Luke Howard at padl.com. I hope that it will be accepted. But 
for the time between you can download it at. 
 
http://na.uni-tuebingen.de/~frohlich/nss_ldap-norecursion.patch 
 
    Greetings 
 
       Mathias Fröhlich 
 

Comment 2 Mathias Fröhlich 2003-06-19 07:08:24 UTC
Patchupdate. 
 
The last one had some symbol respolving problems with the RedHat 9 tls libc. Since I use a 
vanilla kernel without tls support I have not seen the problem at the first time ... 
Now the weak pthread symbol handling is done as required. 
 
http://na.uni-tuebingen.de/~frohlich/gethostbyname-guard.patch 
 
The updated patch is also submitted to Luke Howard at padl.com. 
 
    Greetings 
 
       Mathias Fröhlich 

Comment 3 Bill Nottingham 2006-08-05 04:33:34 UTC
Red Hat apologizes that these issues have not been resolved yet. We do want to
make sure that no important bugs slip through the cracks.

Red Hat Linux 7.3 and Red Hat Linux 9 are no longer supported by Red Hat, Inc.
They are maintained by the Fedora Legacy project (http://www.fedoralegacy.org/)
for security updates only. If this is a security issue, please reassign to the
'Fedora Legacy' product in bugzilla. Please note that Legacy security update
support for these products will stop on December 31st, 2006.

If this is not a security issue, please check if this issue is still present
in a current Fedora Core release. If so, please change the product and version
to match, and check the box indicating that the requested information has been
provided.

If you are currently still running Red Hat Linux 7.3 or 9, please note that
Fedora Legacy security update support for these products will stop on December
31st, 2006. You are strongly advised to upgrade to a current Fedora Core release
or Red Hat Enterprise Linux or comparable. Some information on which option may
be right for you is available at http://www.redhat.com/rhel/migrate/redhatlinux/.

Any bug still open against Red Hat Linux 7.3 or 9 at the end of 2006 will be
closed 'CANTFIX'. Again, if this bug still exists in a current release, or is a
security issue, please change the product as necessary. We thank you for your
help, and apologize again that we haven't handled these issues to this point.


Comment 5 Bill Nottingham 2007-01-02 19:02:04 UTC
Red Hat Linux 7.3 and Red Hat Linux 9 are no longer supported by Red Hat, Inc.
f you are currently still running Red Hat Linux 7.3 or 9, you are strongly
advised to upgrade to a current Fedora Core release or Red Hat Enterprise Linux
or comparable. Some information on which option may be right for you is
available at http://www.redhat.com/rhel/migrate/redhatlinux/.

Closing as CANTFIX.


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