]> andersk Git - gssapi-openssh.git/blobdiff - openssh/auth-pam.c
Import of OpenSSH 4.3p1
[gssapi-openssh.git] / openssh / auth-pam.c
index 4cbde4ecdae3fbfee26c76d4e5b0a3f0a5147a98..8ff3320d30f44cfcff3f234e4519b2c5bc47e715 100644 (file)
@@ -716,8 +716,18 @@ sshpam_query(void *ctx, char **name, char **info,
                        plen++;
                        xfree(msg);
                        break;
-               case PAM_SUCCESS:
                case PAM_AUTH_ERR:
+                       debug3("PAM: PAM_AUTH_ERR");
+                       if (**prompts != NULL && strlen(**prompts) != 0) {
+                               *info = **prompts;
+                               **prompts = NULL;
+                               *num = 0;
+                               **echo_on = 0;
+                               ctxt->pam_done = -1;
+                               return 0;
+                       }
+                       /* FALLTHROUGH */
+               case PAM_SUCCESS:
                        if (**prompts != NULL) {
                                /* drain any accumulated messages */
                                debug("PAM: %s", **prompts);
@@ -763,7 +773,7 @@ sshpam_respond(void *ctx, u_int num, char **resp)
        Buffer buffer;
        struct pam_ctxt *ctxt = ctx;
 
-       debug2("PAM: %s entering, %d responses", __func__, num);
+       debug2("PAM: %s entering, %u responses", __func__, num);
        switch (ctxt->pam_done) {
        case 1:
                sshpam_authenticated = 1;
This page took 0.049047 seconds and 4 git commands to generate.