# HG changeset patch # User Kim Alvefur # Date 1414506290 -3600 # Node ID 57bb2497fadc64a5178a297bb8f986d0fba9a030 # Parent 88e0b4bace889e72a703e0959042b1d4fdd45173 mod_auth_pam: Update for removal of PAM_ prefixes to constant names diff -r 88e0b4bace88 -r 57bb2497fadc mod_auth_pam/mod_auth_pam.lua --- a/mod_auth_pam/mod_auth_pam.lua Sat Oct 25 01:27:52 2014 +0200 +++ b/mod_auth_pam/mod_auth_pam.lua Tue Oct 28 15:24:50 2014 +0100 @@ -15,13 +15,13 @@ function test_password(username, password) local h, err = pam.start("xmpp", username, { function (t) - if #t == 1 and t[1][1] == pam.PAM_PROMPT_ECHO_OFF then + if #t == 1 and t[1][1] == pam.PROMPT_ECHO_OFF then return { { password, 0} }; end end }); - if h and h:authenticate() and h:endx(pam.PAM_SUCCESS) then - return true, true; + if h and h:authenticate() and h:endx(pam.SUCCESS) then + return user_exists(username), true; end return nil, true; end