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

Re: [libvirt] [PATCH] tests: Put a mock library at the start of LD_PRELOAD



On Tue, Jul 30, 2013 at 10:37:40 +0100, Daniel Berrange wrote:
> On Tue, Jul 30, 2013 at 11:29:11AM +0200, Jiri Denemark wrote:
> > This fixes vircgrouptest when run in a sandbox which already overrides
> > open() and others.
> 
> In general I think that having multiple LD_PRELOADS overriding the
> same symbols may well lead to pain.
> 
> We try to make it at least chain up the libraries by using the
> 'RTLD_NEXT' handle when looking up the "real" symbol, which
> should make it forward to the next preloaded library. From
> the sound of it, your sandbox tool isn't using RTLD_NEXT,
> causing the libvirt override to be skipped when the order was
> reversed.

I did some investigation and the sandbox actually uses RTLD_NEXT but
unfortunately searches for full symbols including their versions. Thus,
e.g., our implementation of fopen() is ignored because the sandbox wants
fopen GLIBC_2 2 5 

> ACK

Thanks and pushed.

Jirka


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