From 73b1ee8290ba82ec5488b06ce545efd5d4dc6e65 Mon Sep 17 00:00:00 2001 From: djm Date: Sat, 11 Sep 2004 12:42:09 +0000 Subject: [PATCH] - (djm) [auth2-kbdint.c auth2-none.c auth2-passwd.c auth2-pubkey.c] Make cygwin code more consistent with that which surrounds it --- ChangeLog | 2 ++ auth2-kbdint.c | 2 +- auth2-none.c | 2 +- auth2-passwd.c | 8 ++++---- auth2-pubkey.c | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7395e720..78b873ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ failing PAM session modules to user then exit, similar to the way /etc/nologin is handled. ok djm@ - (dtucker) [auth-pam.c] Relocate sshpam_store_conv(), no code change. + - (djm) [auth2-kbdint.c auth2-none.c auth2-passwd.c auth2-pubkey.c] + Make cygwin code more consistent with that which surrounds it 20040830 - (dtucker) [session.c openbsd-compat/bsd-cygwin_util.{c,h}] Bug #915: only diff --git a/auth2-kbdint.c b/auth2-kbdint.c index 1696ef4d..fa836497 100644 --- a/auth2-kbdint.c +++ b/auth2-kbdint.c @@ -53,7 +53,7 @@ userauth_kbdint(Authctxt *authctxt) xfree(lang); #ifdef HAVE_CYGWIN if (check_nt_auth(0, authctxt->pw) == 0) - return(0); + authenticated = 0; #endif return authenticated; } diff --git a/auth2-none.c b/auth2-none.c index 2bf5b5c8..787458da 100644 --- a/auth2-none.c +++ b/auth2-none.c @@ -103,7 +103,7 @@ userauth_none(Authctxt *authctxt) userauth_banner(); #ifdef HAVE_CYGWIN if (check_nt_auth(1, authctxt->pw) == 0) - return(0); + return (0); #endif if (options.password_authentication) return (PRIVSEP(auth_password(authctxt, ""))); diff --git a/auth2-passwd.c b/auth2-passwd.c index a4f482d2..2321ef47 100644 --- a/auth2-passwd.c +++ b/auth2-passwd.c @@ -55,12 +55,12 @@ userauth_passwd(Authctxt *authctxt) if (change) logit("password change not supported"); - else if (PRIVSEP(auth_password(authctxt, password)) == 1 + else if (PRIVSEP(auth_password(authctxt, password)) == 1) + authenticated = 1; #ifdef HAVE_CYGWIN - && check_nt_auth(1, authctxt->pw) + if (check_nt_auth(1, authctxt->pw) == 0) + authenticated = 0; #endif - ) - authenticated = 1; memset(password, 0, len); xfree(password); return authenticated; diff --git a/auth2-pubkey.c b/auth2-pubkey.c index 9898d4a6..bafea09d 100644 --- a/auth2-pubkey.c +++ b/auth2-pubkey.c @@ -158,7 +158,7 @@ done: xfree(pkblob); #ifdef HAVE_CYGWIN if (check_nt_auth(0, authctxt->pw) == 0) - return(0); + authenticated = 0; #endif return authenticated; } -- 2.45.2