diff options
Diffstat (limited to 'auth2.c')
-rw-r--r-- | auth2.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -216,6 +216,13 @@ userauth_finish(Authctxt *authctxt, int authenticated, char *method) | |||
216 | authenticated = 0; | 216 | authenticated = 0; |
217 | #endif /* USE_PAM */ | 217 | #endif /* USE_PAM */ |
218 | 218 | ||
219 | #ifdef _UNICOS | ||
220 | if (authenticated && cray_access_denied(authctxt->user)) { | ||
221 | authenticated = 0; | ||
222 | fatal("Access denied for user %s.",authctxt->user); | ||
223 | } | ||
224 | #endif /* _UNICOS */ | ||
225 | |||
219 | /* Log before sending the reply */ | 226 | /* Log before sending the reply */ |
220 | auth_log(authctxt, authenticated, method, " ssh2"); | 227 | auth_log(authctxt, authenticated, method, " ssh2"); |
221 | 228 | ||
@@ -235,6 +242,10 @@ userauth_finish(Authctxt *authctxt, int authenticated, char *method) | |||
235 | if (authctxt->failures++ > AUTH_FAIL_MAX) { | 242 | if (authctxt->failures++ > AUTH_FAIL_MAX) { |
236 | packet_disconnect(AUTH_FAIL_MSG, authctxt->user); | 243 | packet_disconnect(AUTH_FAIL_MSG, authctxt->user); |
237 | } | 244 | } |
245 | #ifdef _UNICOS | ||
246 | if (strcmp(method, "password") == 0) | ||
247 | cray_login_failure(authctxt->user, IA_UDBERR); | ||
248 | #endif /* _UNICOS */ | ||
238 | methods = authmethods_get(); | 249 | methods = authmethods_get(); |
239 | packet_start(SSH2_MSG_USERAUTH_FAILURE); | 250 | packet_start(SSH2_MSG_USERAUTH_FAILURE); |
240 | packet_put_cstring(methods); | 251 | packet_put_cstring(methods); |