[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: authbind (LD_PRELOAD) and multiarch



Goswin von Brederlow writes ("Re: authbind (LD_PRELOAD) and multiarch"):
> Raphael Hertzog <hertzog@debian.org> writes:
> > What does fakeroot do? My first idea would be to fail early and provide a
> > useful error message.
> 
> fake(ch)root sets LD_PRELOAD=lib.so and
> LD_LIBRARY_PATH="/usr/lib/fakeroot:/usr/lib32/fakeroot:/usr/lib64/fakeroot:$LD_LIBRARY_PATH"
> or nowadays the same using the multiarch dirs. So the library remains a
> private library but ld.so is tasked with searching for the one mathing
> the elf format it is loading.

This is addressing the question of where to put the library and still
keep it private.  But TBH I'm not sure that there's actually a good
reason for the .so not to go in /usr/lib.  That would obviate the need
for the kind of helper you are suggesting here:

> The tool would then contain the know-how to figure out which multiarch
> directories to include in a single point instead of eveyone duplicating
> that code.

An alternative would be to have a single subdirectory of /usr/lib, say
/usr/lib/preload-weird-shit/<triplet>, which was always searched by
the linker.


I think the harder problem is how to get the right libraries
installed.  If you want to run fakeroot you need the library for every
configured architecture.

Ian.


Reply to: