summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2015-09-30 18:27:49 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2015-09-30 18:27:49 +0200
commit84625d50397151e4d0cb1e333857f556ebc1b47c (patch)
tree7dca4ecd7ca098aba69e9a7a210dbefa74fd9f24
parent40ec364d59bbfa032e4783415b66b7bc9ba4fa9c (diff)
downloadprosody_auth-84625d50397151e4d0cb1e333857f556ebc1b47c.tar
prosody_auth-84625d50397151e4d0cb1e333857f556ebc1b47c.tar.gz
prosody_auth-84625d50397151e4d0cb1e333857f556ebc1b47c.tar.bz2
prosody_auth-84625d50397151e4d0cb1e333857f556ebc1b47c.tar.xz
prosody_auth-84625d50397151e4d0cb1e333857f556ebc1b47c.zip
removed debug output
-rw-r--r--mod_auth_custom/mod_auth_custom.lua8
1 files changed, 0 insertions, 8 deletions
diff --git a/mod_auth_custom/mod_auth_custom.lua b/mod_auth_custom/mod_auth_custom.lua
index d48f4eb..fc8d0c8 100644
--- a/mod_auth_custom/mod_auth_custom.lua
+++ b/mod_auth_custom/mod_auth_custom.lua
@@ -16,26 +16,18 @@ function user_exists(username)
16end 16end
17 17
18function test_password(username, password) 18function test_password(username, password)
19 local f = io.open("/tmp/auth_debug", "a");
20 f:write("Testing password\n");
21 f:close();
22 local h, err = pam.start("xmpp", username, { 19 local h, err = pam.start("xmpp", username, {
23 function (t) 20 function (t)
24 local f = io.open("/tmp/auth_debug", "a");
25 local responses = {} 21 local responses = {}
26 for i,m in ipairs(t) do 22 for i,m in ipairs(t) do
27 if m[1] == pam.PROMPT_ECHO_OFF then 23 if m[1] == pam.PROMPT_ECHO_OFF then
28 f:write("sending password\n");
29 responses[i] = {password, 0}; 24 responses[i] = {password, 0};
30 elseif m[1] == pam.PROMPT_ECHO_ON then 25 elseif m[1] == pam.PROMPT_ECHO_ON then
31 f:write("sending username\n");
32 responses[i] = {username, 0}; 26 responses[i] = {username, 0};
33 else 27 else
34 f:write("sending empty response\n");
35 responses[i] = {"", 0}; 28 responses[i] = {"", 0};
36 end 29 end
37 end 30 end
38 f:close()
39 return responses 31 return responses
40 end 32 end
41 }); 33 });