Bug 168253 - glibc: support an arbitrary number of search domains in the stub resolver
glibc: support an arbitrary number of search domains in the stub resolver
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Florian Weimer
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 677316
  Show dependency treegraph
 
Reported: 2005-09-13 19:13 EDT by Jason Vas Dias
Modified: 2018-01-12 05:52 EST (History)
7 users (show)

See Also:
Fixed In Version: glibc-2.25.90-18.fc27 glibc-2.25-12.fc26
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-01-12 05:52:13 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Sourceware 19569 None None None 2016-05-03 02:41 EDT
Sourceware 21885 None None None 2017-08-09 11:25 EDT
Sourceware 21932 None None None 2017-08-09 11:24 EDT

  None (edit)
Description Jason Vas Dias 2005-09-13 19:13:22 EDT
Description of problem:

The number of search path elements that can be in a resolv.conf "search" list
is too small - only 6 - and does not agree with the BIND resolver's maximum of
8 search list elements.

resolv.h has:
line 93: # define MAXDNSRCH  6   /* max # domains in search path */

while bind's lwres/lwres.h has:
line 217:# define LWRES_CONFMAXSEARCH 8   /* max 8 domains in "search" entry */

This can result in all glibc resolver linked tools failing to resolve a 
domain name that the bind-utils 'host' program can resolve fine.

Moreover, the documentation states that the maximum length of the search list
is 256; this is way too small, and should be at least (MAXDNSRCH * (255+1)) ,
since each component of the search list can be up to 255 chars, there must 
be one space char between each entry, and the terminating '\0'. 
BIND also has a 256 char maximum line length limit on resolv.conf lines.

Let's try to synch the behaviour of the glibc and BIND resolvers .

I suggest that a value of 6 search list components is too small for this 
very useful resolv.conf feature - so please can we increase it to at least 8,
or even 16, and consider increasing the maximum resolv.conf line length to 2048 
- then I'll increase bind's resolv.conf line length and maximum number of 
search path elements to whatever glibc's is.

I'd just like to suggest that this issue should be looked at as an enhancement
for a future release.

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

How reproducible:
100%

Steps to Reproduce:
1. Put a search list with more than 6 elements in resolv.conf, eg.:
'
search boston.redhat.com lab.boston.redhat.com corp.redhat.com devel.redhat.com
build.redhat.com test.redhat.com redhat.com
'
2. Try to resolv a host in the 7th domain

Actual results:
# ping people
ping: unknown host people
# host people
people.redhat.com has address 172.16.48.237
  
Expected results:
Hosts in the 7th domain should resolve fine 

Additional info:
Comment 1 Jakub Jelinek 2005-09-14 02:42:06 EDT
This can't be changed in glibc, as it is part of user visible structure
(_res) that many programs are using.  Changing the constant would break binary
compatibility.
Comment 2 Dag Wieers 2013-09-17 11:39:01 EDT
Can you please open #677316 so we can see what it is about ?
Comment 3 Florian Weimer 2016-05-04 03:07:38 EDT
We are reconsidering this enhancement request to support deployments migrating from NIS host name lookups to DNS.

(There is a way to lift the limit in a way that does not impact ABI.)
Comment 4 Fedora Update System 2017-10-11 12:17:31 EDT
glibc-2.25-12.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-2c63df4fe3
Comment 5 Fedora Update System 2017-10-11 12:18:31 EDT
glibc-2.25-12.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-2c63df4fe3
Comment 6 Fedora Update System 2017-10-13 00:22:10 EDT
glibc-2.25-12.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-2c63df4fe3
Comment 7 Fedora Update System 2017-10-25 19:09:30 EDT
glibc-2.25-12.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

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