Bug 427822 - command "host" interprets relative names without adding a dot before domain
Summary: command "host" interprets relative names without adding a dot before domain
Status: CLOSED DUPLICATE of bug 426348
Alias: None
Product: Fedora
Classification: Fedora
Component: bind   
(Show other bugs)
Version: 8
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Adam Tkac
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2008-01-07 18:15 UTC by Petr Šplíchal
Modified: 2016-06-01 01:36 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-01-08 11:17:40 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Petr Šplíchal 2008-01-07 18:15:06 UTC
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):

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

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-08 02:10:17 UTC
Me too

Comment 2 william hanlon 2008-01-08 03:14:55 UTC
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

my resolv.conf:
search cosmic.utah.edu


Comment 3 Petr Šplíchal 2008-01-08 11:17:40 UTC

*** 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.