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

Re: Integrating Pam

Wayne Cuddy <wayne@crb-web.com> writes:

> I have built an extension module for Python which is a wrapper around
> some of the PAM library.  When trying to use the library from python I
> get no error message when doing a 'pam_start' but strange error messages
> show up the /var/log/message file which are not present when I build and
> use a stand alone executable.  My python extension module is a shared
> library which does not need to be linked with python so I have only
> linked it with pam & pam_misc.  I am using pam-0.59.  Here are my error
> messages.  Similar messages show up no matter which service I try to use.

  I ran into this problem as well when writing our SOCKS module.  I assume
you are using the dynamic loading of python to interface with pam?  And
linking just the module with -lpam and -lpam_misc?

  If python is not loading the module with RTLD_GLOBAL, then the subsequent 
dlopen()s of the pam modules will only look in the main applications symbol 
table for resolution, and fail.

  You either need to:

1. tell python to load pam as well - I have no idea how to do this, being a 
   python neophyte
2. link the python interpreter with -lpam - ugly
3. make python open your module with the RTLD_GLOBAL flags.

-Bill P.

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