From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7091 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] support alternate backends for the passwd and group dbs Date: Mon, 23 Feb 2015 13:15:14 -0500 Message-ID: <20150223181514.GF23507@brightrain.aerifal.cx> References: <1424658940-16635-1-git-send-email-josiahw@gmail.com> <1424660290-25921-1-git-send-email-josiahw@gmail.com> <20150223060840.GB23507@brightrain.aerifal.cx> <20150223061843.GA8602@openwall.com> <20150223070443.GC23507@brightrain.aerifal.cx> 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: ger.gmane.org 1424715338 1513 80.91.229.3 (23 Feb 2015 18:15:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 23 Feb 2015 18:15:38 +0000 (UTC) Cc: musl@lists.openwall.com To: M Farkas-Dyck Original-X-From: musl-return-7104-gllmg-musl=m.gmane.org@lists.openwall.com Mon Feb 23 19:15:37 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1YPxXa-0000bn-V1 for gllmg-musl@m.gmane.org; Mon, 23 Feb 2015 19:15:35 +0100 Original-Received: (qmail 9640 invoked by uid 550); 23 Feb 2015 18:15:32 -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 9599 invoked from network); 23 Feb 2015 18:15:28 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:7091 Archived-At: On Mon, Feb 23, 2015 at 11:01:11AM -0500, M Farkas-Dyck wrote: > On 23/02/2015, Rich Felker wrote: > > 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. > > For nonstatic non-nsc backends, one could alternately have files in > question on synthetic filesystem, e.g. 9p, so backend program would > simply be synthetic filesystem server and musl wouldn't need to care. Generally the only time you use non-static backends is when your user database is so huge that parsing /etc/passwd over and over would be prohibitively slow. Think of university or corporate user database with tens or hundreds of thousands of users. A synthetic filesystem does not help with this any more than a generated passwd file in /etc would help; the goal is to get rid of the linear-search-on-each-lookup performance problem. Rich