On Feb 23, 2015 12:18 AM, "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? > > Alexander Yes, musl is intentionally repurposing it. By using it as an extra place to look it is much harder to create a situation where getpwuid et al change their results because of an inability to talk to the daemon. Additionally, musl's normal path is file lookup, which should not be slow (and hence has no need for a cache). And of course, by reusing the protocol, musl gets compatibility with the backends configured on glibc systems for free.