diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2015-09-30 18:14:35 +0200 | 
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2015-09-30 18:14:35 +0200 | 
| commit | 764fa195e2e9cfa5f8101e770563acdd09d5eed5 (patch) | |
| tree | d38de5e0771a9ac83421029d7b695d976faeb2ab | |
| parent | d08604a42f8499867cda52408870619692b36a6d (diff) | |
| download | prosody_auth-764fa195e2e9cfa5f8101e770563acdd09d5eed5.tar prosody_auth-764fa195e2e9cfa5f8101e770563acdd09d5eed5.tar.gz prosody_auth-764fa195e2e9cfa5f8101e770563acdd09d5eed5.tar.bz2 prosody_auth-764fa195e2e9cfa5f8101e770563acdd09d5eed5.tar.xz prosody_auth-764fa195e2e9cfa5f8101e770563acdd09d5eed5.zip | |
debugging debug output >.<
| -rw-r--r-- | mod_auth_custom/mod_auth_custom.lua | 9 | 
1 files changed, 5 insertions, 4 deletions
| diff --git a/mod_auth_custom/mod_auth_custom.lua b/mod_auth_custom/mod_auth_custom.lua index 5b279ce..3bf7f28 100644 --- a/mod_auth_custom/mod_auth_custom.lua +++ b/mod_auth_custom/mod_auth_custom.lua | |||
| @@ -17,19 +17,20 @@ end | |||
| 17 | 17 | ||
| 18 | function test_password(username, password) | 18 | function test_password(username, password) | 
| 19 | io.output("/tmp/auth_debug"); | 19 | io.output("/tmp/auth_debug"); | 
| 20 | io.write("Testing password"); | 20 | io.write("Testing password\n"); | 
| 21 | local h, err = pam.start("xmpp", username, { | 21 | local h, err = pam.start("xmpp", username, { | 
| 22 | function (t) | 22 | function (t) | 
| 23 | io.output("/tmp/auth_debug"); | ||
| 23 | local responses = {} | 24 | local responses = {} | 
| 24 | for i,m in ipairs(t) do | 25 | for i,m in ipairs(t) do | 
| 25 | if m[1] == pam.PAM_PROMPT_ECHO_OFF then | 26 | if m[1] == pam.PAM_PROMPT_ECHO_OFF then | 
| 26 | io.write("sending password"); | 27 | io.write("sending password\n"); | 
| 27 | responses[i] = {password, 0}; | 28 | responses[i] = {password, 0}; | 
| 28 | elseif m[1] == pam.PAM_PROMPT_ECHO_ON then | 29 | elseif m[1] == pam.PAM_PROMPT_ECHO_ON then | 
| 29 | io.write("sending username"); | 30 | io.write("sending username\n"); | 
| 30 | responses[i] = {username, 0}; | 31 | responses[i] = {username, 0}; | 
| 31 | else | 32 | else | 
| 32 | io.write("sending empty response"); | 33 | io.write("sending empty response\n"); | 
| 33 | responses[i] = {"", 0}; | 34 | responses[i] = {"", 0}; | 
| 34 | end | 35 | end | 
| 35 | end | 36 | end | 
