[Nix-dev] getent LD_LIBRARY_PATH

Rickard Nilsson rickard.nilsson at telia.com
Tue Dec 11 15:55:36 CET 2012


Den 2012-12-10 16:49:26 skrev Lluís Batlle i Rossell <viric at viric.name>:

> On Mon, Dec 10, 2012 at 04:39:14PM +0100, Rickard Nilsson wrote:
>> Hi,
>>
>> I investigated an issue I have with getent, where LDAP entries don't  
>> show
>> up when I run 'getent passwd'. It turns out, in that case, getent reads
>> /etc/nsswitch.conf, finds "passwd: files ldap", loads libnss_files.so
>> (from glibc), prints the local users, and then tries to load
>> libnss_ldap.so from glibc. But since I use the nslcd daemon (nixos  
>> option
>> users.ldap.daemon.enable), that nss module is provided by the
>> nss-pam-ldapd package which is not in getent's LD_LIBRARY_PATH.  
>> Therefore,
>> no LDAP users are listed by getent.
>>
>> However, nss-pam-ldapd is in systemPackages (added by
>> users.ldap.daemon.enable), so if I "export
>> LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/run/current-system/sw/lib" everything
>> works fine.
>>
>> Why is /run/current-system/sw/lib not in LD_LIBRARY_PATH by default? In
>> NixOS' default environment,
>> LD_LIBRARY_PATH=/run/opengl-driver/lib:/run/opengl-driver-32/lib.
>>
>> Or should this be solved by setting LD_LIBRARY_PATH specifically for
>> getent? But how can that be done? I wouldn't want to introduce a
>> dependency on nss-pam-ldapd in glibc...
>
> Maybe we need a /run/nss holding those libs in nixos, and that added to
> LD_LIBRARY_PATH?
>
> A LD_LIBRARY_PATH including sw/lib can make some programs installed in  
> the user
> profiles not work (taking nixos libs instead of the libs set in the
> program rpath).

Having /run/nss sounds reasonable to me. Are there any other options for  
solving this?


   / Rickard


More information about the nix-dev mailing list