summaryrefslogtreecommitdiff
path: root/auth1.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-02-18 17:01:00 +1100
committerDamien Miller <djm@mindrot.org>2001-02-18 17:01:00 +1100
commit60396b060b803fd2d20aa151dc0432a344f798b0 (patch)
tree6027eced4465cbb8ab7146ba6cd3f9a89c38bd03 /auth1.c
parent75da9a9e721bf0f73aab8a28505a62224c327d18 (diff)
- (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);