summaryrefslogtreecommitdiff
path: root/auth-pam.c
diff options
context:
space:
mode:
authordtucker <dtucker>2005-09-28 12:33:27 +0000
committerdtucker <dtucker>2005-09-28 12:33:27 +0000
commit79ad1230b840d1e6a4388b892c98cd6d32df68cb (patch)
tree5cae8d72e419d0a625d7e344dec71819934378cb /auth-pam.c
parent951f7074d4823c77097993e090164de1cb3bf2f7 (diff)
downloadopenssh-79ad1230b840d1e6a4388b892c98cd6d32df68cb.tar.gz
- (dtucker) [auth-pam.c] Bug #1028: send final non-query messages from
PAM via keyboard-interactive. Patch tested by the folks at Vintela.
Diffstat (limited to 'auth-pam.c')
-rw-r--r--auth-pam.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/auth-pam.c b/auth-pam.c
index 0446cd55..787aad1d 100644
--- a/auth-pam.c
+++ b/auth-pam.c
@@ -47,7 +47,7 @@
/* Based on $FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.11 2003/03/31 13:48:18 des Exp $ */
#include "includes.h"
-RCSID("$Id: auth-pam.c,v 1.126 2005/07/17 07:18:50 djm Exp $");
+RCSID("$Id: auth-pam.c,v 1.127 2005/09/28 12:33:27 dtucker Exp $");
#ifdef USE_PAM
#if defined(HAVE_SECURITY_PAM_APPL_H)
@@ -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);