[Nix-dev] Handling NSS modules

Eelco Dolstra e.dolstra at tudelft.nl
Wed Mar 26 17:18:08 CET 2008


Ludovic Courtès wrote:

> I added support for `nss-mdns' [0] to NixOS.  Since this requires
> applications to be able find the various `libnss_mdns' shared objects,
> my current solution is to add `nssModulesPath' to `LD_LIBRARY_PATH' in
> `/etc/profile'.

There is a simpler solution that I used to add LDAP support (via nss_ldap): add 
nss_ldap to the LD_LIBRARY_PATH of the nscd daemon.  If nscd is running, then 
other programs won't actually load any NSS modules, they'll let nscd do it. 
When you change the configuration (enable/disable LDAP for instance), nscd will 
be restarted automatically.  And presumably you'll get slightly better 
performance as well due to caching in nscd.

Of course this isn't the most elegant solution either, but the only real 
solution would be to patch Glibc so that we can specify a full path to the NSS 
modules in /etc/nsswitch.conf.

-- 
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/



More information about the nix-dev mailing list