diff options
| author | Christoph Gysin <christoph.gysin@gmail.com> | 2016-01-24 13:33:32 +0200 |
|---|---|---|
| committer | Christoph Gysin <christoph.gysin@gmail.com> | 2016-01-25 20:14:44 +0200 |
| commit | 1fc6e45a856010fc4994f70455ae5a26260ae479 (patch) | |
| tree | e755c763ae8af158687b7b6098f2101e8b6f1b9d | |
| parent | a17033fdd2acba9772d27ad858e801c63703b7c3 (diff) | |
swaylock: add pam conversation debug output
| -rw-r--r-- | main.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -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; i<num_msg; ++i) { + sway_log(L_DEBUG, "msg[%d]: (%s) %s", i, + msg_style_names[msg[i]->msg_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; |
