From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1570 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Design for extensible passwd[/shadow?] db support Date: Mon, 13 Aug 2012 17:03:15 -0400 Message-ID: <20120813210315.GA27715@brightrain.aerifal.cx> References: <20120812053802.GA10971@brightrain.aerifal.cx> <20120812205643.GT27715@brightrain.aerifal.cx> <20120813135048.GX27715@brightrain.aerifal.cx> <20120813192833.GY27715@brightrain.aerifal.cx> <58cedf3a99d2a7eb61d861abdb8c1840@exys.org> <20120813195032.GZ27715@brightrain.aerifal.cx> <10bce7f58679d9e976e3ddf95d11d995@exys.org> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1344891745 19054 80.91.229.3 (13 Aug 2012 21:02:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 13 Aug 2012 21:02:25 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1571-gllmg-musl=m.gmane.org@lists.openwall.com Mon Aug 13 23:02:23 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1T11mG-00038Y-0j for gllmg-musl@plane.gmane.org; Mon, 13 Aug 2012 23:02:20 +0200 Original-Received: (qmail 11677 invoked by uid 550); 13 Aug 2012 21:02:18 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 11669 invoked from network); 13 Aug 2012 21:02:18 -0000 Content-Disposition: inline In-Reply-To: <10bce7f58679d9e976e3ddf95d11d995@exys.org> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:1570 Archived-At: 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