nsswitch.conf - db service for hosts

Carlos O'Donell carlos@systemhalted.org
Sun Jul 24 14:07:02 GMT 2022


On Sat, Jul 23, 2022 at 6:19 PM Peter Polgar via Libc-help
<libc-help@sourceware.org> wrote:
> I am trying to use the db service in nsswitch.conf. I couldn't make it work
> so I decided to get some hints from the source code.
> A comment in test-netdb.c:310 says that "db is not implemented for hosts".
> Also seen in the nss/Makefile:128 that "hosts" is filtered out from the
> list of dbs.
> Do these mean that db service is not implemented for hosts?

Correct, hosts, network, key and alias are not provided for the db service.

Not all backends provide all services.

> If it is implemented how can I find the path where nsswitch is looking for
> the db?

It is not implemented. Not all backing stores are good choices for the
kind of data to cache and the values that need to be cached.

Adding hosts would require an evaluation of how the data should be
stored and invalidated.

Cheers,
Carlos.


More information about the Libc-help mailing list