Bug 669163 - empty "search" option in /etc/resolv.conf causes resolution failure
empty "search" option in /etc/resolv.conf causes resolution failure
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: bind (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Adam Tkac
qe-baseos-daemons
:
Depends On:
Blocks: 703451 703452 830807
  Show dependency treegraph
 
Reported: 2011-01-12 14:32 EST by Lee Kinser
Modified: 2012-07-27 10:38 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
when resolv.conf contained "search" keyword with no arguments host/nslookup/dig utilities failed to parse it correctly. In these updated packages, such lines are ignored.
Story Points: ---
Clone Of:
: 703451 703452 830807 (view as bug list)
Environment:
Last Closed: 2011-05-19 08:58:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Lee Kinser 2011-01-12 14:32:08 EST
Description of problem:
When the "search" option is present in /etc/resolv.conf but there are no arguments entered for the option, the contents of the following line in the file are interpreted as the missing argument.  If that following line contains the only "nameserver" option in the file, the end result is that the system will have no nameservers specified and will therefore fail to resolve any hostnames.


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


How reproducible:
Always


Steps to Reproduce:
1.  Modify /etc/resolv.conf to match the following lines:
# /etc/resolv.conf
search
nameserver 4.2.2.1

2.  Attempt DNS resolution via host, dig, or nslookup:
[root@testhost ~]# host www.google.com
;; connection timed out; no servers could be reached

3.  Modify /etc/resolv.conf to match the following lines:
# /etc/resolv.conf
search foo.com
nameserver 4.2.2.1

4.  Attempt DNS resolution via host, dig, or nslookup:
[root@testhost ~]# host www.google.com
www.google.com is an alias for www.l.google.com.
www.l.google.com has address 74.125.157.99

5.  Modify /etc/resolv.conf to match the following lines (note the intentional blank line):
# /etc/resolv.conf
search

nameserver 4.2.2.1

6.  Attempt DNS resolution via host, dig, or nslookup:
[root@testhost ~]# host www.google.com
host: parse of /etc/resolv.conf failed

  

Actual results:
DNS resolution failure without notification of configuration error


Expected results:
Parse error due to blank "search" option -OR- disregard for blank "search" option and proper parsing of remaining /etc/resolv.conf configuration file

Additional info:
Comment 5 Martin Cermak 2011-03-18 06:14:05 EDT
According to https://beaker.engineering.redhat.com/jobs/63067 - VERIFIED.
Comment 6 Ryan Lerch 2011-04-12 20:04:13 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
when resolv.conf contained "search" keyword with no arguments host/nslookup/dig utilities failed to parse it correctly. Now such lines are ignored.
Comment 7 Ryan Lerch 2011-05-03 23:33:59 EDT
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-when resolv.conf contained "search" keyword with no arguments host/nslookup/dig utilities failed to parse it correctly. Now such lines are ignored.+when resolv.conf contained "search" keyword with no arguments host/nslookup/dig utilities failed to parse it correctly. In these updated packages, such lines are ignored.
Comment 8 errata-xmlrpc 2011-05-19 08:58:30 EDT
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 therefore 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.

http://rhn.redhat.com/errata/RHBA-2011-0541.html

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