Return PAM_AUTH_ERR instead of PAM_CONV_ERR if user enters ^C at the
password prompt.
This commit is contained in:
@@ -259,7 +259,7 @@ sudo_conv(num_msg, msg, response, appdata_ptr)
|
|||||||
int n, flags, std_prompt;
|
int n, flags, std_prompt;
|
||||||
|
|
||||||
if ((*response = malloc(num_msg * sizeof(struct pam_response))) == NULL)
|
if ((*response = malloc(num_msg * sizeof(struct pam_response))) == NULL)
|
||||||
return(PAM_CONV_ERR);
|
return(PAM_SYSTEM_ERR);
|
||||||
zero_bytes(*response, num_msg * sizeof(struct pam_response));
|
zero_bytes(*response, num_msg * sizeof(struct pam_response));
|
||||||
|
|
||||||
for (pr = *response, pm = *msg, n = num_msg; n--; pr++, pm++) {
|
for (pr = *response, pm = *msg, n = num_msg; n--; pr++, pm++) {
|
||||||
@@ -331,5 +331,5 @@ err:
|
|||||||
zero_bytes(*response, num_msg * sizeof(struct pam_response));
|
zero_bytes(*response, num_msg * sizeof(struct pam_response));
|
||||||
free(*response);
|
free(*response);
|
||||||
*response = NULL;
|
*response = NULL;
|
||||||
return(PAM_CONV_ERR);
|
return(gotintr ? PAM_AUTH_ERR : PAM_CONV_ERR);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user