On 2026-09-20 09:23:48 +0200, Marco Moock wrote: > Am 19.09.26 um 23:40 schrieb Vincent Lefevre: > > In any case, I don't see why IPv6 support in the kernel matters > > for nscd. I don't see any reason why nscd would do an IPv6 > > connection; that's useless for name resolving. > > nscd is only a cache for libc, it does not do any lookups. The sources > defined in nsswitch.conf do the lookups.
This is incorrect: when nscd is running, nsswitch.conf is not used at all by the program that calls getaddrinfo! There's only a connection to "/var/run/nscd/socket". > > > > BTW, I've just found that the French (and much older) version is much > > > > more informative: http://manpagesfr.free.fr/man/man8/nscd.8.html > > > > > > That doesn't say from which distribution it came (at > > > > I suppose that this corresponds to upstream. > > > > Or does the nscd(8) man page depend on the distribution? > > The implementation depends. GNU (used on Linux), BSD and Solaris exist But BSD and Solaris are not Linux! So the above man page http://manpagesfr.free.fr/man/man8/nscd.8.html (which explicitly says "Manuel de l'administrateur Linux") has nothing to do with BSD and Solaris. Now, does the nscd(8) man page depend on the *Linux* distribution? > > > > > When possible, use standard tools like getent instead of custom > > > > > programs or scripts. > > > > > > > > getent does *not* work in the same way. In particular, in the test, > > > > I got an exit status 2 in each case while IP addresses were available > > > > in each case (e.g. with getaddrinfo). And no error messages at all. > > > > That's very unhelpful. > > > > > > Can you give a test case? > > > > Already given, with results, in <[email protected]> > > (Sun, 13 Sep 2026 02:35:49 +0200). This is: > > > > #!/bin/sh > > getent ahostsv4 $1 || echo "Error: $?" > > getent ahostsv6 $1 || echo "Error: $?" > > getent ahosts $1 || echo "Error: $?" > > I tried that on my machine with google.com as argument, works fine. > > $ grep hosts /etc/nsswitch.conf > hosts: files dns > > nscd is enabled and working (I searched the cache with the strings command). But I suspect that you tried with a DNS server that does not return random SERVFAIL errors. -- Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)

