public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: Peter Polgar <ppeter.bme@gmail.com>
To: "Carlos O'Donell" <carlos@systemhalted.org>, libc-help@sourceware.org
Subject: Re: nsswitch.conf - db service for hosts
Date: Sun, 24 Jul 2022 18:56:42 +0200	[thread overview]
Message-ID: <CAF2BDb8J-8g2OSz+Wb_8UjijWOGRZ0TXzp0xY2GOdKfL+9mwtA@mail.gmail.com> (raw)
In-Reply-To: <CAE2sS1gLjS5CYfmTv0wXbcjQXzT9nTBr_yH3as7WNd7n5SFL=w@mail.gmail.com>

Thanks! Now it's clear to me.

Then any idea on how to achieve a static fallback for IP if DNS fails?
My idea was to have it likes this:
hosts:   files mdns dns db

So files and mdns can handle localhost and .local first then if dns fails
db can have a record for the host in question. Without db this apparently
won't work.

Peter

On Sun, 24 Jul 2022, 16:07 Carlos O'Donell, <carlos@systemhalted.org> wrote:

> 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.
>

  reply	other threads:[~2022-07-24 16:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-23 22:18 Peter Polgar
2022-07-24 14:07 ` Carlos O'Donell
2022-07-24 16:56   ` Peter Polgar [this message]
2022-07-29 16:23     ` Carlos O'Donell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAF2BDb8J-8g2OSz+Wb_8UjijWOGRZ0TXzp0xY2GOdKfL+9mwtA@mail.gmail.com \
    --to=ppeter.bme@gmail.com \
    --cc=carlos@systemhalted.org \
    --cc=libc-help@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).