linking problem/question

Thorsten Kukuk kukuk at suse.de
Wed Sep 13 06:29:01 UTC 2006


On Tue, Sep 12, Marcin Krzysztof Porwit wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On many of the systems that we have in-house (SuSE*, RHEL), certain
> modules explicitely list libpam.so in their ldd output, and other
> modules do not. pam_succeed_if.so has an explicit reference, but
> pam_unix.so does not, for example. 

You are missing important informations like the version you are using.
pam_unix.so is linked against libpam.so.

> Unfortunately, this means that an
> attempt to dlopen pam_unix.so fails because symbols such as pam_get_item
> are not defined. We're able to get around this problem by specifying
> LD_PRELOAD=/lib/libpam.so when executing our code, but I'm confused as
> to how this works for any program not resorting to LD_PRELOAD.

Because a program using the official PAM interface and not playing
around with dlopen is linked against libpam.so.

> Any insight into what could be going on here is appreciated.

You don't write why you dlopen the PAM module yourself and don't use
the PAM functions. This doesn't make any sense. if you use the official
PAM functions, the questions is how you was able to link your application
without linking it against libpam?

-- 
Thorsten Kukuk         http://www.suse.de/~kukuk/      kukuk at suse.de
SUSE LINUX Products GmbH       Maxfeldstr. 5       D-90409 Nuernberg
--------------------------------------------------------------------    
Key fingerprint = 8C6B FD92 EE0F 42ED F91A  6A73 6D1A 7F05 2E59 24BB




More information about the Pam-list mailing list