Bug 9871
Summary: | getaddrinfo() isn't obeying search rules... | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Rob Seace <rob> | ||||
Component: | glibc | Assignee: | Jakub Jelinek <jakub> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | |||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 8.0 | CC: | fweimer, ryan | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i386 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2003-04-21 23:54:11 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: | |||||||
Attachments: |
|
Description
Rob Seace
2000-02-29 21:45:20 UTC
Created attachment 152 [details]
Test program to illustrate getaddrinfo()'s misbehavior...
assign to jakub This bug still exists in 8.0 (glibc 2.2.93-5). Thanks much to Mr. Seace for the test program. This causes, among other things, a problem with the default sendmail config where it only listens to 127.0.0.1. Even though I have both the FQDN and short hostname assigned to 127.0.0.1 in /etc/hosts, and "hosts: files dns" in /etc/nsswitch.conf, glibc is always using DNS. Therefore, when sendmail, running on the local box, tries to connect to the FQDN of the local box, it pulls the eth0 IP from DNS instead of the 127.0.0.1 from /etc/hosts, and it can't connect. Interestingly enough, if I change /etc/nsswitch.conf to: hosts: files [NOTFOUND=return] dns then getaddrinfo() actually returns the correct IP from /etc/hosts (which seems contrary to the meaning of "NOTFOUND"). Of course, if I do this, then I cannot resolve any names from DNS whatsoever... Please fix! I pay cash bribes under the table as necessary. ;-) Try it with RHL9. Running the test program on an RHL9 system with an nsswitch.conf entry like hosts: files dns does not show any DNS activity in the strace log. |