cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Hostname resolve sequence using the Ares library in Curl

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Tue, 4 Nov 2003 12:55:43 +0100 (CET)

On Tue, 4 Nov 2003, Frank Ticheler wrote:

> It seems that the Ares library by default prefers the DNS lookup above the
> /etc/hosts file lookup. This behaviour can be changed by adding a lookup tag
> to the /etc/resolv.conf file: lookup files bind. This way, the hosts file is
> checked first.
>
> As far as I know, this lookup tag in resolv.conf is no standard behaviour

Standard or not, it seems to be commonly used all over, judging from a little
googling on the subject.

> and I would expect the Ares library to read the nsswitch.conf file instead.

I would expect it to support both!

> I was wondering if anyone has any experience with this also.

Reading the source code clearly shows that there is no attempt at all to read
the nsswitch.conf file at all. This would indeed be a good thing to fix.

Would you be able to provide a patch to introduce this?

-- 
 Daniel - been obfuscating curl source code since 1998.
 [[ Do not post private mails to this email address. They won't reach me. ]]
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
Received on 2003-11-04