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

Fixed Re: Integrating Pam



Thanks to Bill P. I was able to solve this problem.  His suggestion about
loading the pam library first solve the problem.  I simply used the LD_PRELOAD
flag before running python and all worked fine.  

NOTE:  Upgrading to glibc-2.0.7-7 on RH linux5.0 solved this problem entirely.

Thanks to all who responded.

On 18 May 1998, William M. Perry wrote:

> Date: 18 May 1998 12:30:36 -0500
> From: "William M. Perry" <wmperry@aventail.com>
> To: wayne@crb-web.com
> Cc: pam-list@redhat.com
> Subject: 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.
> 

Wayne Cuddy
CRB-WEB (C & H Consulting)
http://www.crb-web.com
wayne@crb-web.com



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