Print

Print


Hey Derek,

It seems like I'll have no choice - I tried to re-export the symbols using dlopen and got the dynamic loader to crash :).  Still debugging though...

RTLD_GLOBAL by default definitely looks dangerous, but we might have to make it an option.

Brian

On Sep 17, 2010, at 3:08 AM, Derek Feichtinger wrote:

> Hi, Brian and all
> 
> Here is a good link suggesting why one should be cautious in using RTLD_GLOBAL on Linux:
> http:[log in to unmask]
> 
> Cheers,
> Derek
> 
> 
> On 09/16/10 20:52, Brian Bockelman wrote:
>> Hi,
>> 
>> In XrdSysPlugin.cc, dlopen() is only called with the RTLD_NOW option.  This is causing problems for something I'm working on.
>> 
>> I'm currently implementing LCMAPS authorization for GSI which needs to:
>> 
>> 1) Load the libXrdLcmaps library (which is linked against liblcmaps) [DONE]
>> 2) Call the lcmaps_init function [DONE]
>> 3) lcmaps then loads its plugins.  For some security reason (which I don't know), the plugins are not linked against liblcmaps itself but use its symbols.
>> 
>> Normally, step (3) is fine because the liblcmaps symbols are in the global namespace.  *However*, since xrootd loads liblcmaps without the RTLD_GLOBAL option, the liblcmaps symbols are not available and the dlopen fails at (3).
>> 
>> What's the reasoning behind not passing RTLD_GLOBAL?  Or has it just never come up?
>> 
>> Brian
>> 
>>   
> 
> 
> -- 
> Dr. Derek Feichtinger                   Tel:   +41 56 310 47 33
> AIT / Scientific Computing              email: [log in to unmask]
> PSI
> CH-5232 Villigen PSI
>