Red Hat Bugzilla – Bug 476572
LOCALDOMAIN environment variable doesn't override search path with nscd running
Last modified: 2008-12-29 16:03:09 EST
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.
Steps to Reproduce:
1. In /etc/resolv.conf
A line like
2. Set say export LOCALDOMAIN="jpl.nasa.gov. csl.co.uk."
With nscd running,
telnet www 80
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
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
,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.