summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/auth2.c
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2001-03-20 18:57:05 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2001-03-20 18:57:05 +0000
commit6c6c19ac0c5fb2d615149ba2f0445e6dafac79e8 (patch)
tree3c1100ce719ba0772e9f0e71db94b44e1c33ff0b /usr.bin/ssh/auth2.c
parentfb225e7d0ebb8fdf6f94fef9701c6916d628ad1a (diff)
add changes need for BSD_AUTH plus disabled BSD_AUTH code
Diffstat (limited to 'usr.bin/ssh/auth2.c')
-rw-r--r--usr.bin/ssh/auth2.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/usr.bin/ssh/auth2.c b/usr.bin/ssh/auth2.c
index a92379d82ec..d5e29865122 100644
--- a/usr.bin/ssh/auth2.c
+++ b/usr.bin/ssh/auth2.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: auth2.c,v 1.46 2001/03/11 13:25:36 markus Exp $");
+RCSID("$OpenBSD: auth2.c,v 1.47 2001/03/20 18:57:04 markus Exp $");
#include <openssl/evp.h>
@@ -208,6 +208,12 @@ input_userauth_request(int type, int plen, void *ctxt)
/* reset state */
dispatch_set(SSH2_MSG_USERAUTH_INFO_RESPONSE, &protocol_error);
authctxt->postponed = 0;
+#ifdef BSD_AUTH
+ if (authctxt->as) {
+ auth_close(authctxt->as);
+ authctxt->as = NULL;
+ }
+#endif
/* try to authenticate user */
m = authmethod_lookup(method);
@@ -305,7 +311,7 @@ userauth_none(Authctxt *authctxt)
m->enabled = NULL;
packet_done();
userauth_banner();
- return authctxt->valid ? auth_password(authctxt->pw, "") : 0;
+ return authctxt->valid ? auth_password(authctxt, "") : 0;
}
int
@@ -321,7 +327,7 @@ userauth_passwd(Authctxt *authctxt)
password = packet_get_string(&len);
packet_done();
if (authctxt->valid &&
- auth_password(authctxt->pw, password) == 1)
+ auth_password(authctxt, password) == 1)
authenticated = 1;
memset(password, 0, len);
xfree(password);