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

linking problem/question



-----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. 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.

This does not appear to be an LD_LIBRARY_PATH issue -- other modules
that list libpam.so in their dependencies find the library in the right
location:
kyle-suse92:/var/log # ldd -r /lib/security/pam_succeed_if.so
        linux-gate.so.1 =>  (0xffffe000)
        libc.so.6 => /lib/tls/libc.so.6 (0x4000a000)
        libpam.so.0 => /lib/libpam.so.0 (0x40121000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
        libdl.so.2 => /lib/libdl.so.2 (0x40129000)
kyle-suse92:/var/log # ldd -r /lib/security/pam_unix.so
undefined symbol: pam_get_item  (/lib/security/pam_unix.so)
undefined symbol: pam_set_data  (/lib/security/pam_unix.so)
undefined symbol: pam_putenv    (/lib/security/pam_unix.so)
undefined symbol: pam_set_item  (/lib/security/pam_unix.so)
undefined symbol: pam_get_data  (/lib/security/pam_unix.so)
undefined symbol: pam_get_user  (/lib/security/pam_unix.so)
        linux-gate.so.1 =>  (0xffffe000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x40013000)
        libdl.so.2 => /lib/libdl.so.2 (0x4002a000)
        libxcrypt.so.1 => /lib/libxcrypt.so.1 (0x4002e000)
        libselinux.so.1 => /lib/libselinux.so.1 (0x40062000)
        libc.so.6 => /lib/tls/libc.so.6 (0x40070000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
kyle-suse92:/var/log # LD_PRELOAD=/lib/libpam.so.0 ldd -r
/lib/security/pam_unix.so
        /lib/libpam.so.0 => /lib/libpam.so.0 (0x4000e000)
        linux-gate.so.1 =>  (0xffffe000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x4001c000)
        libdl.so.2 => /lib/libdl.so.2 (0x40032000)
        libxcrypt.so.1 => /lib/libxcrypt.so.1 (0x40036000)
        libselinux.so.1 => /lib/libselinux.so.1 (0x4006a000)
        libc.so.6 => /lib/tls/libc.so.6 (0x40078000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

Any insight into what could be going on here is appreciated.
- --
Marcin Krzysztof Porwit
mporwit centeris com

#include <stddisclaimer.h>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFBzpt4OZU6cX5VBERAg/qAJ95tuQ01cMXK/KeRBnuVx8JA5jHlACfUUDb
bg2q5SnWOnyz8s86H7qvII0=
=I3aT
-----END PGP SIGNATURE-----


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