mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: Solar Designer <solar@openwall.com>
Cc: musl@lists.openwall.com
Subject: Re: [PATCH] support alternate backends for the passwd and group dbs
Date: Mon, 23 Feb 2015 02:04:43 -0500	[thread overview]
Message-ID: <20150223070443.GC23507@brightrain.aerifal.cx> (raw)
In-Reply-To: <20150223061843.GA8602@openwall.com>

On Mon, Feb 23, 2015 at 09:18:43AM +0300, Solar Designer wrote:
> On Mon, Feb 23, 2015 at 01:08:40AM -0500, Rich Felker wrote:
> > On Sun, Feb 22, 2015 at 08:58:10PM -0600, Josiah Worcester wrote:
> > > when we fail to find the entry in the commonly accepted files,  we
> > > query a server over a Unix domain socket on /var/run/nscd/socket.
> > > the protocol used here is compatible with glibc's nscd protocol on
> > > most systems (all that use 32-bit numbers for all the protocol fields,
> > > which appears to be everything but Alpha).
> > 
> > I'm committing with the attached additional changes [...]
> 
> Hmm.  I guess this was discussed before, but I am surprised.  Wasn't
> nscd intended for caching rather than to provide a fallback?  If so,
> does musl intentionally re-purpose it?

There were multiple discussions of how to support alternate backends
in the past, and the main two candidates were a new text-based
protocol over a unix socket that returns the result in passwd/group
file form, and repurposing nscd protocol. While I originally preferred
the former, using nscd has the advantage that, on existing glibc
systems with non-default (possibly even custom nss modules) backends,
everything works out of the box. Using a new protocol/new daemon would
require installing that daemon before any musl-linked binaries could
lookup users/groups, and would require significant custom glue to
integrate with custom site-local backends.

The intended usage for musl binaries running on glibc systems is to
use whatever nscd is already running. Systems with a network-based
user/group db backend should already be running nscd; if not it's easy
to add. Systems just using passwd/group files don't need it anyway.

For musl-native systems, the user is intended to have some choice. The
options should eventually include at least:

1. A featureful generic nscd implementation that uses one or more nss
   modules (optionally static linked into the daemon or dynamically
   loaded) as its backend(s).

2. A simple nscd implementation that just does NIS and LDAP.

At this time neither exists, but it's possible to use glibc nscd if
really needed.

Rich


  parent reply	other threads:[~2015-02-23  7:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-23  2:35 Josiah Worcester
2015-02-23  2:58 ` Josiah Worcester
2015-02-23  6:08   ` Rich Felker
2015-02-23  6:18     ` Solar Designer
2015-02-23  6:24       ` Josiah Worcester
2015-02-23  7:04       ` Rich Felker [this message]
2015-02-23 16:01         ` M Farkas-Dyck
2015-02-23 18:15           ` Rich Felker

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=20150223070443.GC23507@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    --cc=solar@openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).