Bug 253660

Summary: nscd doesn't properly return the local hostname if 3 chars in length
Product: Red Hat Enterprise Linux 4 Reporter: csb sysadmin <admin>
Component: nssAssignee: Kai Engert (:kaie) (inactive account) <kengert>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.4   
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: 2007-08-21 09:38:45 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 csb sysadmin 2007-08-21 01:01:04 UTC
Description of problem:

[root@tin ~]# ypcat -k hosts | grep "tin "
tin 160.129.138.133     tin     tin.structbio.vanderbilt.edu
[root@tin ~]# /etc/init.d/nscd start
Starting nscd:                                             [  OK  ]
[root@tin ~]# ping tin
ping: unknown host tin
[root@tin ~]# /etc/init.d/nscd stop
Stopping nscd:                                             [  OK  ]
[root@tin ~]# ping tin
PING tin (160.129.138.133) 56(84) bytes of data.
64 bytes from tin (160.129.138.133): icmp_seq=0 ttl=64 time=0.018 ms
[root@tin ~]# grep hosts /etc/nsswitch.conf 
#hosts:     db files ldap nis dns
hosts:      files nis dns


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


How reproducible:
always

Steps to Reproduce:
1. use nis and set hostname in nis hosts file to something like (3 letters):

160.129.138.133     tin     tin.structbio.vanderbilt.edu
2. set nsswitch.conf as above, try to ping tin, try traceroute, try "hostname -s"
3. turn off nscd then try all of above
  
Actual results:
when nscd is on I always get unknown hostname. when nscd is off the command succeeds

Expected results:
The command should succeed whether or not nscd is on or off.

Additional info:

Comment 1 csb sysadmin 2007-08-21 01:10:58 UTC
my fault forgot /etc/init.d/nscd reload ..works again, can close notabug

Comment 2 Kai Engert (:kaie) (inactive account) 2007-08-21 09:38:45 UTC
Resolving bug as NOTABUG as requested by reporter.