authenticate is a method for a pam object. This prevents a 500 error
when using the PAM plugin.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@cascardo.eti.br>
def _authenticate(self, username, password):
if self.lm.service_name:
- ok = pam.authenticate(username, password, self.lm.service_name)
+ ok = pam.pam().authenticate(username, password, self.lm.service_name)
else:
- ok = pam.authenticate(username, password)
+ ok = pam.pam().authenticate(username, password)
if ok:
self.log("User %s successfully authenticated." % username)