[Bug 727360] New: glibc's HOSTALIASES does not work as described (for non suid/sgid binaries)
https://bugzilla.novell.com/show_bug.cgi?id=727360
https://bugzilla.novell.com/show_bug.cgi?id=727360#c0
Summary: glibc's HOSTALIASES does not work as described (for
non suid/sgid binaries)
Classification: openSUSE
Product: openSUSE 11.2
Version: Final
Platform: All
OS/Version: SLES 11
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Development
AssignedTo: pth@suse.com
ReportedBy: brian.cain@gmail.com
QAContact: qa@suse.de
Found By: ---
Blocker: ---
User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.2 (KHTML, like
Gecko) Chrome/15.0.874.106 Safari/535.2
The HOSTALIASES environment variable does not modify gethostbyname() as
documented, but it is effective on other distros (with earlier upstream glibc
releases).
Is there a way to override this behavior on SLES, or has glibc been built such
as to disable the feature entirely?
Reproducible: Always
Steps to Reproduce:
~~~~~~~
cat <<EOF > lookup.c
#include
https://bugzilla.novell.com/show_bug.cgi?id=727360
https://bugzilla.novell.com/show_bug.cgi?id=727360#c
Philipp Thomas
https://bugzilla.novell.com/show_bug.cgi?id=727360
https://bugzilla.novell.com/show_bug.cgi?id=727360#c2
Michael Matz
https://bugzilla.novell.com/show_bug.cgi?id=727360
https://bugzilla.novell.com/show_bug.cgi?id=727360#c3
--- Comment #3 from Brian Cain
Debian switches off caching of the hosts database in nscd for instance (since glibc 2.5), that's why it works there. I guess Redhat either does the same, or these old glibcs really behaved differently. I can't see how how current libcs would ever have worked differently. With nscd hosts caching the __libc_res_nquery routine never is entered (and never was), and that's the only one that calls res_hostalias, and that's the only one that respects this environment variable.
So barring nscd caching might re-enable the feature? Can you imagine any other workarounds?
It's either a documentation bug or a code bug, but in any case it's an upstream bug, now reported here: http://sourceware.org/bugzilla/show_bug.cgi?id=13375
Thanks. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com