Re: shared library loading flags

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

 



On Thu, 6 Dec 2012 12:38:50 -0800
Steve Langasek <vorlon@xxxxxxxxxx> wrote:

> On Thu, Dec 06, 2012 at 09:23:55PM +0200, Artur Artamonov wrote:
> > Is there some specific explanations why modules is loaded with flags
> > RTLD_NOW?
> 
> > pam_dynamic.c:67:       return dlopen(mod_path, RTLD_NOW);
> 
> Because if you're missing a dependency symbol, you want this to be
> discovered and reported at load time, not when you're deep in the
> middle of the stack.
> 
> > There was issue when i was using myown PAM module that uses others
> > shared libraries. I was calling this module from dropbear and there
> > allways was some unresolved symbols from shared librarires after i
> > added flag RTLD_GLOBAL 
> 
> > pam_dynamic.c:67:       return dlopen(mod_path,
> > RTLD_NOW|RTLD_GLOBAL);
> 
> > Is there possible that this flag will added in next LinuxPAM
> > realise?
> 
> Certainly not.  RTLD_GLOBAL means:
> 
>             The symbols defined by this library will be made
> available for symbol resolution of subsequently loaded libraries.
> 
> There is no reason that you should need the symbols from the PAM
> module dumped into the global namespace; and doing so can cause
> crashes due to symbol collisions.
> 
> If you find yourself needing this, then you have missing library
> dependency declarations somewhere else in your setup.
> 

Shared libraries was used only by PAMmodule and only PAM module was
responsable for loading dynamic symbols. And PAM module have different
so defined then application that using it.
If you saying that there is no need of such symbol i will make more
testing and trying to resolve it.

_______________________________________________
Pam-list mailing list
Pam-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/pam-list


[Index of Archives]     [Fedora Users]     [Kernel]     [Red Hat Install]     [Linux for the blind]     [Gimp]

  Powered by Linux