Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 3 product line. The current stable release is 3.9. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 135422

Summary: getent returns nothing
Product: Red Hat Enterprise Linux 3 Reporter: Roehl Obaldo <robaldo>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-22 07:42:03 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 Roehl Obaldo 2004-10-12 16:55:13 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)

Description of problem:
Getent hosts will not display output if hostname starts with numeric.
It has no problem resolving if hostname starts with alpha characters.




Version-Release number of selected component (if applicable):
glibc-2.3.2-95.27

How reproducible:
Always

Steps to Reproduce:
1.Configure hosts entry in /etc/nsswitch.conf to first look 
in /etc/hosts.
2.Add two entries to the /etc/hosts file:
192.168.2.1    dhcp2-1
192.168.2.2    2dhcp2
3.Issue the commands:
getent hosts dhcp2-1
getent hosts 2dhcp2

    

Actual Results:  getent hosts dhcp2-1
192.168.2.1     dhcp2-1

getent hosts 2dhcp2
<NOTHING>

Expected Results:  getent hosts dhcp2-1
192.168.2.1     dhcp2-1

getent hosts 2dhcp2
192.168.2.2    2dhcp2



Additional info:

Comment 1 Jakub Jelinek 2004-10-22 07:42:03 UTC
Fixed in glibc-2.3.3-73.