Bug 476568

Summary: LOCALDOMAIN environment variable no longer works in F10 with nscd running
Product: [Fedora] Fedora Reporter: Colin.Simpson
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 10CC: drepper, jakub
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-12-29 19:56:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Colin.Simpson 2008-12-15 19:14:14 UTC
Description of problem:
If you set the environment variable LOCALHOST it is supposed to override the system default search path. It doesn't, you simply get the system search path from resolv.conf if nscd is running.

How reproducible:

Everytime

Steps to Reproduce:
1. Ensure nscd is running. Then Set 

export LOCALDOMAIN="notsearch.com. orginaldomain.com."

and only have 

search orginaldomain.com.

, in resolv.conf

2. telnet to say a webserver "testwww" on a machine that is only in notsearch.com

3. telnet testwww 80
  
Actual results:

On F10 you get,

telnet: testwww: Name or service not known

On F9 you get,

telnet testwww 80
Trying 192.168.5.47...
Connected to testwww
Escape character is '^]'.

Additional info:

Works if nscd is stopped. Actually there is a more subtle bug (maybe a feature) in earlier nscds, which is probably still there in F10 if this bug was not masking it. I've just noticed. Before consulting the LOCALDOMAIN flag it seems to always consult nscd's system default path before trying LOCALDOMAIN. This seems to be in RHEL 4 and 5 so I'll probably log a separate bug report on that.

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

Comment 2 Ulrich Drepper 2008-12-29 21:02:34 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.

It will appear in the next build.