[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH] new applet gethostbyname
From: Laurent Bercot <ska-dietlibc () skarnet ! org>
Date: 2012-07-08 23:50:37
Message-ID: 20120708235037.GA21401 () skarnet ! org
[Download RAW message or body]
> Quick fix, major absolutely correct:
>
> /etc/nsswitch contains line:
>
> hosts: files dns
>
> /etc/host.conf contains:
>
> order hosts, bind
Ah, yes, I confused the syntaxes, sorry about that.
/etc/nsswitch.conf indeed contains something like "hosts: files dns"
to configure NSS.
The thing is that libresolv, the BIND DNS client library, *also* adds
a compatibility layer to /etc/hosts, in case someone doesn't want to use
NSS *but* still wants a /etc/hosts file for local DNS definitions.
/etc/host.conf is a configuration file for the libresolv, and
"order hosts, bind" means that DNS queries will first be answered using
the data in /etc/hosts if possible, and fall back on real DNS mechanisms
otherwise.
Compatibility layer on compatibility layer!
Conclusion: for direct DNS access, use the djbdns command-line tools,
the djbdns client library, or my client library. Less bloat, less
complexity, better interfaces. :P
--
Laurent
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic