diff options
author | Damien Miller <djm@mindrot.org> | 2000-09-16 16:25:12 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-09-16 16:25:12 +1100 |
commit | b70b61f5fecf37d95e031414849745030fa8a420 (patch) | |
tree | 33a92aca5fde66bde1c3bb3cdabfc5a4c27e24ab /auth2.c | |
parent | 52cbcbf0bb5ee685f77449f68c59926320bfe85f (diff) |
- (djm) Update CygWin support from Corinna Vinschen <vinschen@cygnus.com>
Diffstat (limited to 'auth2.c')
-rw-r--r-- | auth2.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -182,6 +182,15 @@ input_userauth_request(int type, int plen) | |||
182 | authenticated = ssh2_auth_pubkey(pw, service); | 182 | authenticated = ssh2_auth_pubkey(pw, service); |
183 | } | 183 | } |
184 | } | 184 | } |
185 | |||
186 | #ifdef HAVE_CYGWIN | ||
187 | if (authenticated && !check_nt_auth(strcmp(method, "password") == 0, pw->pw_uid)) { | ||
188 | packet_disconnect("Authentication rejected for uid %d.", | ||
189 | (int) pw->pw_uid); | ||
190 | authenticated = 0; | ||
191 | } | ||
192 | #endif | ||
193 | |||
185 | if (authenticated && pw && pw->pw_uid == 0 && !options.permit_root_login) { | 194 | if (authenticated && pw && pw->pw_uid == 0 && !options.permit_root_login) { |
186 | authenticated = 0; | 195 | authenticated = 0; |
187 | log("ROOT LOGIN REFUSED FROM %.200s", | 196 | log("ROOT LOGIN REFUSED FROM %.200s", |
@@ -189,8 +198,8 @@ input_userauth_request(int type, int plen) | |||
189 | } | 198 | } |
190 | 199 | ||
191 | #ifdef USE_PAM | 200 | #ifdef USE_PAM |
192 | if (authenticated && !do_pam_account(pw->pw_name, NULL)) | 201 | if (authenticated && !do_pam_account(pw->pw_name, NULL)) |
193 | authenticated = 0; | 202 | authenticated = 0; |
194 | #endif /* USE_PAM */ | 203 | #endif /* USE_PAM */ |
195 | 204 | ||
196 | /* Raise logging level */ | 205 | /* Raise logging level */ |