]> granicus.if.org Git - sudo/commitdiff
Return PAM_AUTH_ERR instead of PAM_CONV_ERR if user enters ^C at the
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 9 Dec 2008 23:48:19 +0000 (23:48 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 9 Dec 2008 23:48:19 +0000 (23:48 +0000)
password prompt.

auth/pam.c

index d6ba2df549d35f85716b235067970a19d35a55ff..a9831ec9f3b4ef0262c2d9ffb49286bb609fb587 100644 (file)
@@ -259,7 +259,7 @@ sudo_conv(num_msg, msg, response, appdata_ptr)
     int n, flags, std_prompt;
 
     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));
 
     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));
     free(*response);
     *response = NULL;
-    return(PAM_CONV_ERR);
+    return(gotintr ? PAM_AUTH_ERR : PAM_CONV_ERR);
 }