1 |
On 11/28/05, Richard Fish <bigfish@××××××××××.org> wrote: |
2 |
> On 11/28/05, Alexander Kirillov <nevis2us@××××××××.su> wrote: |
3 |
> > >>The local resolver lib will use either /etc/hosts file or dns queries in |
4 |
> > >>the order defined in your /etc/host.conf |
5 |
> > > |
6 |
> > > You mean /etc/nsswitch.conf? |
7 |
> > |
8 |
> > I probably do. Is /etc/host.conf still of any use? |
9 |
> |
10 |
> Actually, I'm not sure. I've always edited nsswitch.conf to get it to |
11 |
> do what I want, with good results. |
12 |
> |
13 |
> I see with strace that when I ping <somehost>, both nsswitch.conf and |
14 |
> host.conf are opened. The man pages don't reveal anything about their |
15 |
> relationship, so I guess I'll have to take a look at the glibc sources |
16 |
> tonight. |
17 |
|
18 |
As close as I can tell from reading the code (which is to say, I am |
19 |
making an only slightly educated guess), the 'order' keyword in |
20 |
host.conf is pretty much ignored by current glibc versions. Host.conf |
21 |
is only consulted by the libnss_files.so module, and then only for the |
22 |
'multi' option. The order in nsswitch.conf is authoritative. |
23 |
|
24 |
This seems to be confirmed by a few "strace ping" attempts with |
25 |
various configurations. |
26 |
|
27 |
-Richard |
28 |
|
29 |
-- |
30 |
gentoo-user@g.o mailing list |