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 amended in as discussed on #musl. With these changes it at least passes the following checks: - With no nscd running, lookups return negative with no error. - With bad nscd running and dropping connections with no reply, reverse-endian fallback code retries the query and then fails with EIO indicating inability to provide a definitive negative answer. - Replies that don't match the query produce EIO. - Replies that do match the query produce successful results. Tested using the attached fake-nscd.c. This code still needs further testing before release to ensure that we're not introducing significant bugs. Rich