[Dnsmasq-discuss] nsswitch
Simon Kelley
simon@thekelleys.org.uk
Sat, 29 Jan 2005 12:36:14 +0000
Thomas Angst wrote:
> Howdy list,
>
> first, this tool is exactly what I needed. Small and easy to administer.
>
> By the way, for easy administering the server I'm now using LDAP.
> In that case I watched, that you are reading /etc/hosts directly instead
> of using the glibc function.
> Can you please made a change in dnsmasq, so it will read the entries not
> directly out of the file?
> It would be great to use nsswitch as it is configured on any system.
As far as I know, the facilities in libc which use nsswitch.conf are
things like gethostbyname(). As these are blocking functions, they are
not suitable as replacements for a direct lookup on the cache in
dnsmasq, populated by /etc/hosts. It might be possible to read all the
names in LDAP at startup and insert them into the dnsmasq cache, but
that needs more LDAP smarts than I have. Does anybody know if that's
possible?
Maybe the best solution would be to configure your clients to do the
LDAP lookups as part of their name resolution, after all, LDAP is
distributed protocol too!
HTH
Simon.