From 1fc6e45a856010fc4994f70455ae5a26260ae479 Mon Sep 17 00:00:00 2001 From: Christoph Gysin Date: Sun, 24 Jan 2016 13:33:32 +0200 Subject: [PATCH] swaylock: add pam conversation debug output --- main.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/main.c b/main.c index e04d0d6..ca3453f 100644 --- a/main.c +++ b/main.c @@ -40,6 +40,20 @@ char *password; int function_conversation(int num_msg, const struct pam_message **msg, struct pam_response **resp, void *appdata_ptr) { + const char* msg_style_names[] = { + NULL, + "PAM_PROMPT_ECHO_OFF", + "PAM_PROMPT_ECHO_ON", + "PAM_ERROR_MSG", + "PAM_TEXT_INFO", + }; + + for(int i=0; imsg_style], + msg[i]->msg); + } + struct pam_response *pam_reply = malloc(sizeof(struct pam_response)); pam_reply[0].resp = password; pam_reply[0].resp_retcode = 0;