Always send the provided password to PAM irrespective of the prompt.

This commit is contained in:
Nikos Mavrogiannopoulos
2013-03-14 19:53:23 +01:00
parent 0be2b2a054
commit 73a532b5c5

View File

@@ -35,10 +35,8 @@ struct pam_response *replies;
for (i=0;i<msg_size;i++) {
/*syslog(LOG_DEBUG, "PAM message: %s\n", msg[i]->msg);*/
if (msg[i]->msg_style == PAM_PROMPT_ECHO_OFF)
replies[i].resp = strdup(l->password);
else if (msg[i]->msg_style == PAM_PROMPT_ECHO_ON)
replies[i].resp = strdup(l->username);
/*if (msg[i]->msg_style == PAM_PROMPT_ECHO_OFF)*/
replies[i].resp = strdup(l->password);
}
*resp = replies;