summaryrefslogtreecommitdiffstats
path: root/auth2.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-09-16 16:25:12 +1100
committerDamien Miller <djm@mindrot.org>2000-09-16 16:25:12 +1100
commitb70b61f5fecf37d95e031414849745030fa8a420 (patch)
tree33a92aca5fde66bde1c3bb3cdabfc5a4c27e24ab /auth2.c
parent52cbcbf0bb5ee685f77449f68c59926320bfe85f (diff)
- (djm) Update CygWin support from Corinna Vinschen <vinschen@cygnus.com>
Diffstat (limited to 'auth2.c')
-rw-r--r--auth2.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/auth2.c b/auth2.c
index 804afd8d..8b0a4bc6 100644
--- a/auth2.c
+++ b/auth2.c
@@ -182,6 +182,15 @@ input_userauth_request(int type, int plen)
authenticated = ssh2_auth_pubkey(pw, service);
}
}
+
+#ifdef HAVE_CYGWIN
+ if (authenticated && !check_nt_auth(strcmp(method, "password") == 0, pw->pw_uid)) {
+ packet_disconnect("Authentication rejected for uid %d.",
+ (int) pw->pw_uid);
+ authenticated = 0;
+ }
+#endif
+
if (authenticated && pw && pw->pw_uid == 0 && !options.permit_root_login) {
authenticated = 0;
log("ROOT LOGIN REFUSED FROM %.200s",
@@ -189,8 +198,8 @@ input_userauth_request(int type, int plen)
}
#ifdef USE_PAM
- if (authenticated && !do_pam_account(pw->pw_name, NULL))
- authenticated = 0;
+ if (authenticated && !do_pam_account(pw->pw_name, NULL))
+ authenticated = 0;
#endif /* USE_PAM */
/* Raise logging level */