mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Re: Design for extensible passwd[/shadow?] db support
Date: Mon, 13 Aug 2012 17:03:15 -0400	[thread overview]
Message-ID: <20120813210315.GA27715@brightrain.aerifal.cx> (raw)
In-Reply-To: <10bce7f58679d9e976e3ddf95d11d995@exys.org>

On Mon, Aug 13, 2012 at 10:14:00PM +0200, Arvid E. Picciani wrote:
> >glibc has a solution for this problem in the form of nscd
> 
> The libc daemon from hell :/
> A proxy daemon requires much more care and policy.

A proxy daemon factors policy out of libc (where it doesn't belong) to
an isolated component that can be replaced or reconfigured without
breaking any apps (whether they're static or dynamic linked).

> What happens when it times out, or responses are invalid, how do i
> do balancing, ... "Falling back on local database" isn't graceful
> degradation.

These are all issues for implementing the proxy daemon, not for libc
to care about. Since it's a local daemon we're talking about, invalid
responses indicate you've been rooted and timing out indicates your
system has major problems (probably DoS).

> It requires that you anticipate the situation and
> make sure there is a fallback user in the passwd for maintenance.

Normally root is in the local passwd database anyway; it's the actual
_users_ whose identities are shared across networks.

> Then security is a whole new topic. Who can access the daemon, what is
> the retry policy,

All of that is at the daemon level; it's not relevant to libc.

> how do i handle linux namespaces, and containers...
> So many things to deal with...

That's a matter for people setting up these things to deal with.

> >I don't think removing ~50 lines of passwd entry lookup code would be
> >of much benefit for cutting down size,
> 
> no, not at all. But being able to ignore ancient posix and go for
> something that gets us to the product faster is something pretty
> valuable
> for me. Let's take the fairly visible example of musl-android:
> it doesn't have /etc/passwd, so i already have to downstream patch
> musl.
> A proxy does not help me, because the fallback is still on /etc/passwd.

Why does it hurt to attempt reading /etc/passwd if the file doesn't
exist and isn't used?

Rich


  reply	other threads:[~2012-08-13 21:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-12  5:38 Rich Felker
2012-08-12 15:16 ` Jeremy Huntwork
2012-08-12 17:27   ` Rich Felker
2012-08-12 17:34 ` Rich Felker
2012-08-12 19:10 ` Arvid E. Picciani
2012-08-12 20:56   ` Rich Felker
2012-08-13  9:41     ` Arvid E. Picciani
2012-08-13 12:27       ` Luca Barbato
2012-08-13 12:46         ` Kurt H Maier
2012-08-13 13:50       ` Rich Felker
2012-08-13 19:22         ` Arvid E. Picciani
2012-08-13 19:28           ` Rich Felker
2012-08-13 19:38             ` Arvid E. Picciani
2012-08-13 19:50               ` Rich Felker
2012-08-13 20:14                 ` Arvid E. Picciani
2012-08-13 21:03                   ` Rich Felker [this message]
2012-08-13 22:10                 ` Luca Barbato
2012-08-13  0:26 idunham
2012-08-13  0:31 ` Rich Felker
2012-08-13 10:45   ` Daniel Cegiełka
2012-08-13 13:46     ` 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=20120813210315.GA27715@brightrain.aerifal.cx \
    --to=dalias@aerifal.cx \
    --cc=musl@lists.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).