Bug 476572 - LOCALDOMAIN environment variable doesn't override search path with nscd running
Summary: LOCALDOMAIN environment variable doesn't override search path with nscd running
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: glibc
Version: 4.7
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Jakub Jelinek
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-15 19:40 UTC by Colin.Simpson
Modified: 2008-12-29 21:03 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-12-29 19:56:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Colin.Simpson 2008-12-15 19:40:08 UTC
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).

Comment 1 Ulrich Drepper 2008-12-29 19:56:37 UTC
That's the expected behavior.

Comment 2 Ulrich Drepper 2008-12-29 21:03:09 UTC
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.