Bug 427822 - command "host" interprets relative names without adding a dot before domain
command "host" interprets relative names without adding a dot before domain
Status: CLOSED DUPLICATE of bug 426348
Product: Fedora
Classification: Fedora
Component: bind (Show other bugs)
8
All Linux
low Severity low
: ---
: ---
Assigned To: Adam Tkac
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-07 13:15 EST by Petr Šplíchal
Modified: 2013-04-30 19:38 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-01-08 06:17:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Petr Šplíchal 2008-01-07 13:15:06 EST
Description of problem:

When calling "host" with a relative hostname (no dot) it tries to look it up
with domains according to /etc/resolv.conf but without adding the dot between
the name and domain.

Version-Release number of selected component (if applicable):
bind-utils-9.5.0-20.b1.fc8

How reproducible:
Look up an IP for a hostname.

Steps to Reproduce:
1. host computer
  
Actual results:
Host computer not found: 3(NXDOMAIN)

Expected results:
computer.search.domain.com has address 10.11.12.13


Additional info:

host -a gives:
Trying "computersearch.domain.com"
Trying "computerdomain.com"
Trying "computer"
Host computer not found: 3(NXDOMAIN)

/etc/resolv.conf contains
search search.domain.com domain.com
Comment 1 Stephen Moore 2008-01-07 21:10:17 EST
Me too
Comment 2 william hanlon 2008-01-07 22:14:55 EST
This is odd. The behavior of the host command seems to be the opposite of how
the man page describes it. When I query a host in my (only) search domain with a
dot, the host command smashes the host and domain together and reports
(correctly) the host doesn't exist. If I query with a single dot at the end of
the hostname without domain, it is supposed to treat the input as an absolute
hostname, which should not work, but for this broken version of host it does.

This doesn't work but should:
host hrlx01
Host hrlx01 not found: 3(NXDOMAIN)

This works but shouldn't:
host hrlx01.
hrlx01.cosmic.utah.edu has address 155.101.22.101

my resolv.conf:
search cosmic.utah.edu

nameserver 155.101.22.167
nameserver 155.101.22.168
nameserver 155.101.3.10
Comment 3 Petr Šplíchal 2008-01-08 06:17:40 EST

*** This bug has been marked as a duplicate of 426348 ***

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