Description of problem: When nscd is running the search path in resolv.conf seems to always be consulted before the LOCALDOMAIN i.e. LOCALDOMAIN doesn't override the system search path. Version-Release number of selected component (if applicable): RHEL 4 has this bug and Fedora 9, can't test F10 as it has completely broken LOCALDOMAIN. How reproducible: Everytime Steps to Reproduce: 1. In /etc/resolv.conf A line like search csl.co.uk 2. Set say export LOCALDOMAIN="jpl.nasa.gov. csl.co.uk." Actual results: With nscd running, telnet www 80 Trying 69.7.164.60... Which is www.csl.co.uk not www.jpl.nasa.gov! I can verify that the jpl.nasa.gov is in the search path somewhere as if I type telnet www2 80 Trying 137.78.99.42... I get jpl not csl, as csl.co.uk doesn't have a www2, so LOCALDOMAIN is clearly picked up eventually. However with no nscd I get, telnet www 80 Trying 137.78.99.24... ,jpl's webserver which is what should happen as according to the LOCALDOMAIN variable. RHEL 5 seems to always consult the system search path first in resolv.conf whether nscd is running or not, then looks at LOCALDOMAIN. So either this is a bug in RHEL 5 (or maybe a security feature, that therefore probably should be in RHEL 4).
That's the expected behavior.
Even if it is the expected behavior I added a work-around which can help in some situations. It will fail if nscd is running because ordinary processes cannot perform lookups. This change is unlikely to be backported to any RHEL release without a really good reason.