- /* Default fallback of PROMPT_ECHO */
- messages[i].type =
- msg[i]->msg_style == PAM_PROMPT_ECHO_OFF
- ? AUTH_MSGTYPE_PROMPT_NOECHO
- : msg[i]->msg_style == PAM_PROMPT_ECHO_ON
- ? AUTH_MSGTYPE_PROMPT_ECHO
- : msg[i]->msg_style == PAM_ERROR_MSG
- ? AUTH_MSGTYPE_ERROR
- : msg[i]->msg_style == PAM_TEXT_INFO
- ? AUTH_MSGTYPE_INFO
- : AUTH_MSGTYPE_PROMPT_ECHO;
+ switch (msg[i]->msg_style) {
+ case PAM_PROMPT_ECHO_OFF: messages[i].type = AUTH_MSGTYPE_PROMPT_NOECHO;
+ if (verbose_p) fprintf (stderr, "ECHO_OFF");
+ break;
+ case PAM_PROMPT_ECHO_ON: messages[i].type = AUTH_MSGTYPE_PROMPT_ECHO;
+ if (verbose_p) fprintf (stderr, "ECHO_ON");
+ break;
+ case PAM_ERROR_MSG: messages[i].type = AUTH_MSGTYPE_ERROR;
+ if (verbose_p) fprintf (stderr, "ERROR_MSG");
+ break;
+ case PAM_TEXT_INFO: messages[i].type = AUTH_MSGTYPE_INFO;
+ if (verbose_p) fprintf (stderr, "TEXT_INFO");
+ break;
+ default: messages[i].type = AUTH_MSGTYPE_PROMPT_ECHO;
+ if (verbose_p) fprintf (stderr, "PROMPT_ECHO");
+ break;
+ }
+
+ if (verbose_p)
+ fprintf (stderr, "=\"%s\"", msg[i]->msg ? msg[i]->msg : "(null)");