Red Hat Bugzilla – Bug 205358
[RHEL3] getent returns nothing if the host starts by a number 
Last modified: 2007-11-16 20:14:46 EST
Description of problem:
When running getent to retrieve its IP address we noticed that if you run it
against a system that has a hostname starting with numbers. For eg.
123host.lehman.com.. it will not return the correct IP address and exits with a
status of 2. We tested this on RHEL4 and noticed that this is fixed in this
version. Was this fixed in later versions of RHEL3 also? This is a widely used
command for shell scripts and the like. Thanks!
[root@tkodclxgiprd001 kickstart]# getent hosts 380g4-cbtst
[root@tkodclxgiprd001 kickstart]# echo $?
[root@njenglx001 tmp]# uname -r
[root@njenglx001 tmp]# getent hosts 380g4-cbtst
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. set in /etc/hosts a host begining by a number
2. getent hosts <that host>
Fixed on 2.3.3-71
Created attachment 135644 [details]
patch from 2.3.3-71 supposed to fix the problem. 
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.
Verified this is fixed in the errata version of glibc-common
Internal Status set to 'Resolved'
Status set to: Closed by Client
This event sent from IssueTracker by firstname.lastname@example.org