- 
                Notifications
    You must be signed in to change notification settings 
- Fork 28
Open
Description
It seems that python_pam is not thread-safe, or I am using it in a wrong way.
At least adding an RLock solved one issue for me:
mar10/wsgidav#265
Maybe you want to add a remark in the readme (or give me a hint how to use it correctly)?
Currently I create an instance p = pam.pam() on startup, then re-use it in request handlers (p.authenticate(...)).
This led to errors, that I was able to fix by wrapping it like
with lock:
    p.authenticate(...)Should a new pam.pam() instance be created in every request-hander instead and would this impact performance?
Also, the readme says
>>> import pam
>>> p = pam.authenticate()
>>> p.authenticate('david', 'correctpassword')
True
...which gives an exception. I assume it should be
>>> import pam
>>> p = pam
>>> p.authenticate('david', 'correctpassword')
True
...instead.
Metadata
Metadata
Assignees
Labels
No labels