How comile pam modules

Nalin Dahyabhai nalin at redhat.com
Thu Dec 8 20:26:08 UTC 2005


On Thu, Dec 08, 2005 at 02:20:03PM -0600, Matt Sellers wrote:
> no luck, still getting same errors....
> 
> Dec  8 14:14:06 linuxlab2 su: PAM unable to 
> dlopen(/lib/security/$ISA/pam_permit.so)
> Dec  8 14:14:06 linuxlab2 su: PAM [dlerror: 
> /lib/security/../../lib/security/pam_permit.so: undefined symbol: 
> _Z12pam_get_userP10pam_handlePPKcS2_]
> Dec  8 14:14:06 linuxlab2 su: PAM adding faulty module: 
> /lib/security/$ISA/pam_permit.so
> Dec  8 14:14:06 linuxlab2 su: PAM unable to 
> dlopen(/lib/security/$ISA/pam_permit.so)
> Dec  8 14:14:06 linuxlab2 su: PAM [dlerror: 
> /lib/security/../../lib/security/pam_permit.so: undefined symbol: 
> _Z12pam_get_userP10pam_handlePPKcS2_]

That looks as though the compiler is reading the prototype for
pam_get_user() as if it were a C++ function and emitting a mangled
reference to it.

Try using "gcc" instead of "g++" and you should be fine.  Otherwise,
arrange for the declaration to be wrapped up in an 'extern "C"' block.

HTH,

Nalin




More information about the Pam-list mailing list