summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/auth1.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/ssh/auth1.c')
-rw-r--r--usr.bin/ssh/auth1.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/usr.bin/ssh/auth1.c b/usr.bin/ssh/auth1.c
index d8a75686d03..3316b7e3586 100644
--- a/usr.bin/ssh/auth1.c
+++ b/usr.bin/ssh/auth1.c
@@ -10,7 +10,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: auth1.c,v 1.19 2001/03/08 18:47:12 stevesk Exp $");
+RCSID("$OpenBSD: auth1.c,v 1.20 2001/03/20 18:57:04 markus Exp $");
#include "xmalloc.h"
#include "rsa.h"
@@ -83,7 +83,7 @@ do_authloop(Authctxt *authctxt)
#ifdef KRB4
(!options.kerberos_authentication || options.kerberos_or_local_passwd) &&
#endif
- auth_password(pw, "")) {
+ auth_password(authctxt, "")) {
auth_log(authctxt, 1, "without authentication", "");
return;
}
@@ -244,7 +244,7 @@ do_authloop(Authctxt *authctxt)
packet_integrity_check(plen, 4 + dlen, type);
/* Try authentication with the password. */
- authenticated = auth_password(pw, password);
+ authenticated = auth_password(authctxt, password);
memset(password, 0, strlen(password));
xfree(password);
@@ -284,6 +284,12 @@ do_authloop(Authctxt *authctxt)
log("Unknown message during authentication: type %d", type);
break;
}
+#ifdef BSD_AUTH
+ if (authctxt->as) {
+ auth_close(authctxt->as);
+ authctxt->as = NULL;
+ }
+#endif
if (!authctxt->valid && authenticated)
fatal("INTERNAL ERROR: authenticated invalid user %s",
authctxt->user);