From 764fa195e2e9cfa5f8101e770563acdd09d5eed5 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 30 Sep 2015 18:14:35 +0200 Subject: debugging debug output >.< --- mod_auth_custom/mod_auth_custom.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'mod_auth_custom/mod_auth_custom.lua') 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 function test_password(username, password) io.output("/tmp/auth_debug"); - io.write("Testing password"); + io.write("Testing password\n"); local h, err = pam.start("xmpp", username, { function (t) + io.output("/tmp/auth_debug"); local responses = {} for i,m in ipairs(t) do if m[1] == pam.PAM_PROMPT_ECHO_OFF then - io.write("sending password"); + io.write("sending password\n"); responses[i] = {password, 0}; elseif m[1] == pam.PAM_PROMPT_ECHO_ON then - io.write("sending username"); + io.write("sending username\n"); responses[i] = {username, 0}; else - io.write("sending empty response"); + io.write("sending empty response\n"); responses[i] = {"", 0}; end end -- cgit v1.2.3