reversed behavior with nsswitch.conf

From: Alexander Leidinger <Alexander_at_Leidinger.net>
Date: Thu, 16 Feb 2006 09:46:46 +0100
Hi,

yesterday I debugged a mail problem where the reverse DNS of the receiver is
somewhat fucked up (for one receiver the DNS resolving chain was: HostA ->
IP-A -> HostB -> IP-B -> HostB, for the other receiver there was no reverse
DNS).

Sendmail doen't like this, but there are ways to circumvent this. So I added
the hosts in question to /etc/hosts (nsswitch contains "hosts: files dns"),
and thought this will solve it. It didn't.

A temporary (as in "to get those 10 mails out") work-around of "hosts: files"
proved that the solution of adding the hosts to /etc/hosts works as expected.

The current solution for the general case is to use "hosts: dns files". It
gets the correct values for the buggy remote hosts from /etc/hosts, and
averything else from DNS.

So it seems the order of the use of the entries in nsswitch.conf is reversed.

I noticed this on a 6.0 system. I can't test this on a -current system right
now (maybe tomorrow or at the weekend), and I don't have a RELENG_6 system.

So if someone can confirm if this bug is visible on -current and on RELENG_6:
 - a fix can be MFCed if it is fixed in -current
 - someone could try to fix it if the same problem exists in -current
 - an errata can be added to the release notes of 6.1 if it isn't
   fixed until the release (that's the reason why I CCed re_at_)

Bye,
Alexander.

-- 
http://www.Leidinger.net  Alexander _at_ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org     netchild _at_ FreeBSD.org  : PGP ID = 72077137
I know you think you thought you knew what you thought I said,
but I'm not sure you understood what you thought I meant.
Received on Thu Feb 16 2006 - 07:46:50 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:52 UTC