Bug 476572 - LOCALDOMAIN environment variable doesn't override search path with nscd running
LOCALDOMAIN environment variable doesn't override search path with nscd running
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: glibc (Show other bugs)
All Linux
low Severity medium
: rc
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2008-12-15 14:40 EST by Colin.Simpson
Modified: 2008-12-29 16:03 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-12-29 14:56:37 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Colin.Simpson 2008-12-15 14:40:08 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. 

How reproducible:

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

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).
Comment 1 Ulrich Drepper 2008-12-29 14:56:37 EST
That's the expected behavior.
Comment 2 Ulrich Drepper 2008-12-29 16:03:09 EST
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.

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