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

Re: bazaar: krb5_fcc_ops has get_cache_first/next/end set



I suppose this is drifting off topic but with the DSO discussion going on
recently maybe this ties in somehow.

With glibc, RTLD_DEEPBIND fixes the problem. At least in my test program.

I have two modules that call a function heim(), one from a DSO dynamically
linked with libheim and one from a DSO statically linked with a slighly
different version of libheim.

If I do dlopen(RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND), dlsym()s
amod_fn and bmod_fn the test outputs:

  amod is calling heim()
  The stock heim() function was called.
  bmod is calling heim()
  The modified heim() function was called.

which is right. If I use dlopen *without* RTLD_DEEPBIND it outputs:

  mod is calling heim()
  The stock heim() function was called.
  bmod is calling heim()
  The stock heim() function was called.

which is not the desired behavior.

Mike

On Thu, 14 Sep 2006 11:45:29 -0700
"Henry B. Hotz" <hotz@jpl.nasa.gov> wrote:

> I've been able to load both Sun/MIT and Heimdal modules in a Sun LDAP  
> server using a similar technique (on Solaris with the Sun compiler/ 
> linker).  I suggest you look very carefully at all the options  
> available for your linker.
> 
> FWIW the heimdal-using module is a .a, not a .so, and that seemed to  
> be necessary.  It's still dynamically loaded though.
> 
> On Sep 13, 2006, at 9:14 AM, Michael B Allen wrote:
> 
> > On Mon, 11 Sep 2006 07:53:45 +0200
> > Love Hörnquist Åstrand <lha@kth.se> wrote:
> >
> >> 8 sep 2006 kl. 17.21 skrev Michael B Allen:
> >>
> >>> Is there any way for the krb5_fcc_ops get_cache_first,  
> >>> get_cache_next,
> >>> and end_cache_get functions to somehow get set?
> >>
> >> They don't exists in a heimdal release, so I assume you are running a
> >> snapshot. If your code somhow load the wrong (older) shared library,
> >> that would look like this problem.
> >
> > We found the problem. Another PHP module (pgsql.so) was dynamically
> > linked with stock Heimdal. My PHP module (plexsso.so) is dynamically
> > linked with a libarary containing my custom Heimdal (mechglue) plus
> > other stuff. As a result, apparently there was some symbol collision.
> >
> > For some reason I thought statically linking everything into one  
> > shared
> > library for the PHP module to dyncamically link with would give me
> > some isolation. Apparently that's not the case. Can anyone recommend
> > a workaround? Are symbols versioned on Linux or once loaded are they
> > shared regardless of their source?
> >
> > Mike

-- 
Michael B Allen
PHP Active Directory SSO
http://www.ioplex.com/