version 1.11, 2002/10/04 18:47:29
|
version 1.11.6.1, 2002/12/19 19:35:27
|
|
|
PEG_METHOD_ENTER(TRC_AUTHENTICATION, | PEG_METHOD_ENTER(TRC_AUTHENTICATION, |
"PAMBasicAuthenticator::PAMCallback()"); | "PAMBasicAuthenticator::PAMCallback()"); |
| |
|
for ( Sint32 i = 0; i < num_msg; i++ ) |
|
{ |
|
if ( msg[i]->msg_style != PAM_PROMPT_ECHO_OFF ) |
|
{ |
|
PEG_METHOD_EXIT(); |
|
return PAM_CONV_ERR; |
|
} |
|
} |
|
|
// | // |
// Copy the application specific data from the PAM structure. | // Copy the application specific data from the PAM structure. |
// | // |
|
|
| |
for ( Sint32 i = 0; i < num_msg; i++ ) | for ( Sint32 i = 0; i < num_msg; i++ ) |
{ | { |
switch ( msg[i]->msg_style ) |
// |
{ |
// We get here only if msg[i]->msg_style == PAM_PROMPT_ECHO_OFF, |
case PAM_PROMPT_ECHO_OFF: |
// no need to check again. |
|
// |
|
|
// | // |
// copy the user password | // copy the user password |
// | // |
resp[i]->resp = (char *)malloc(PAM_MAX_MSG_SIZE); | resp[i]->resp = (char *)malloc(PAM_MAX_MSG_SIZE); |
strcpy(resp[i]->resp, mydata->userPassword); | strcpy(resp[i]->resp, mydata->userPassword); |
resp[i]->resp_retcode = 0; | resp[i]->resp_retcode = 0; |
break; |
|
|
|
default: |
|
PEG_METHOD_EXIT(); |
|
return PAM_CONV_ERR; |
|
} |
|
} | } |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |