summaryrefslogtreecommitdiff
path: root/auth1.c
diff options
context:
space:
mode:
authordjm <djm>2001-02-18 06:01:00 +0000
committerdjm <djm>2001-02-18 06:01:00 +0000
commit121dc2cdb3ca19b028358f100332ac81947f7bdf (patch)
treec0fe36a3636704dde3af956e4f796882163ea0b5 /auth1.c
parent69ae2acc67360b956ffad6247b7af273d7752f48 (diff)
downloadopenssh-121dc2cdb3ca19b028358f100332ac81947f7bdf.tar.gz
- (djm) Merge BSD_AUTH support from Markus Friedl and David J. MacKenzie
enable with --with-bsd-auth.
Diffstat (limited to 'auth1.c')
-rw-r--r--auth1.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/auth1.c b/auth1.c
index 11c56a51..beccf2b4 100644
--- a/auth1.c
+++ b/auth1.c
@@ -92,7 +92,7 @@ do_authloop(Authctxt *authctxt)
#elif defined(HAVE_OSF_SIA)
0) {
#else
- auth_password(pw, "")) {
+ auth_password(authctxt, "")) {
#endif
auth_log(authctxt, 1, "without authentication", "");
return;
@@ -262,7 +262,7 @@ do_authloop(Authctxt *authctxt)
password);
#else /* !USE_PAM && !HAVE_OSF_SIA */
/* Try authentication with the password. */
- authenticated = auth_password(pw, password);
+ authenticated = auth_password(authctxt, password);
#endif /* USE_PAM */
memset(password, 0, strlen(password));
@@ -303,6 +303,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);