On 11/28/05, Richard Fish <[EMAIL PROTECTED]> wrote: > On 11/28/05, Alexander Kirillov <[EMAIL PROTECTED]> wrote: > > >>The local resolver lib will use either /etc/hosts file or dns queries in > > >>the order defined in your /etc/host.conf > > > > > > You mean /etc/nsswitch.conf? > > > > I probably do. Is /etc/host.conf still of any use? > > Actually, I'm not sure. I've always edited nsswitch.conf to get it to > do what I want, with good results. > > I see with strace that when I ping <somehost>, both nsswitch.conf and > host.conf are opened. The man pages don't reveal anything about their > relationship, so I guess I'll have to take a look at the glibc sources > tonight.
As close as I can tell from reading the code (which is to say, I am making an only slightly educated guess), the 'order' keyword in host.conf is pretty much ignored by current glibc versions. Host.conf is only consulted by the libnss_files.so module, and then only for the 'multi' option. The order in nsswitch.conf is authoritative. This seems to be confirmed by a few "strace ping" attempts with various configurations. -Richard -- gentoo-user@gentoo.org mailing list