[Nix-dev] Re: Handling NSS modules

Ludovic Courtès ludo at gnu.org
Wed Mar 26 18:07:39 CET 2008


Hi,

Eelco Dolstra <e.dolstra at tudelft.nl>
writes:

> 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.

Nice trick!  ;-)

In the meantime, I committed (rev. 11290) a fix that:

  1. adds `nssModules' to `systemPathsList'
  2. adds `/lib' to `pathsToLink';
  3. adds `/var/run/current-system/sw/lib' to `LD_LIBRARY_PATH' in
     `/etc/profile'.

This should be enough to fix the problem, though the `LD_LIBRARY_PATH'
hack is admittedly inelegant.

> 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.

Yes or, alternatively, specify an NSS module search path in, say,
`/etc/nsswitch-path.conf', which might be easier to do.

Thanks,
Ludo'.




More information about the nix-dev mailing list