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

Re: Reentrant??



Savochkin Andrey Vladimirovich <saw@msu.ru> writes:

> On Fri, Jun 05, 1998 at 01:32:07PM -0400, Wayne Cuddy wrote:
> > Is the pam library setup to be reentrant?  Can I call pam_start
> > multiple times and get different pam handles to work with?  I have a
> > threaded server that will want to authenticate different users in each
> > thread.
> 
> PAM library is designed to be reentrant.  The only remained problem is
> openlog/syslog/closelog calls from the library.  Libc doesn't provide a
> reenterable interface for the calls.
> 
> However, many modules seem to be not reenterable.  The most important
> module pam_pwdb can't be used in a threaded environment too :-( But it's
> rather a libpwdb problem.

  These modules should be fixed. :)  Soon.

> From my point of view, it's possible to use PAM in threaded applications
> if you have checked the modules you want to use for reenterability.

  I would say that we should do whatever we need to to make the core PAM
libraries (anything in the linuxpam distribution tarball) reentrant.
Otherwise servers like Wayne's and I's are going to end up wrapping a mutex 
around all calls to PAM, 'just in case', and that's just plain ugly. :)

-Bill P.



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