From d08604a42f8499867cda52408870619692b36a6d Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 30 Sep 2015 18:12:39 +0200 Subject: moved debug output to file --- 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 8f3ae76..5b279ce 100644 --- a/mod_auth_custom/mod_auth_custom.lua +++ b/mod_auth_custom/mod_auth_custom.lua @@ -16,19 +16,20 @@ function user_exists(username) end function test_password(username, password) - print("Testing password"); + io.output("/tmp/auth_debug"); + io.write("Testing password"); local h, err = pam.start("xmpp", username, { function (t) local responses = {} for i,m in ipairs(t) do if m[1] == pam.PAM_PROMPT_ECHO_OFF then - print("sending password"); + io.write("sending password"); responses[i] = {password, 0}; elseif m[1] == pam.PAM_PROMPT_ECHO_ON then - print("sending username"); + io.write("sending username"); responses[i] = {username, 0}; else - print("sending empty response"); + io.write("sending empty response"); responses[i] = {"", 0}; end end -- cgit v1.2.3