diff options
Diffstat (limited to 'auth2.c')
-rw-r--r-- | auth2.c | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -203,7 +203,7 @@ input_userauth_request(int type, int plen, void *ctxt) | |||
203 | if ((style = strchr(user, ':')) != NULL) | 203 | if ((style = strchr(user, ':')) != NULL) |
204 | *style++ = 0; | 204 | *style++ = 0; |
205 | 205 | ||
206 | if (authctxt->attempt++ == 0) { | 206 | if (authctxt->attempt++ == 0) { |
207 | /* setup auth context */ | 207 | /* setup auth context */ |
208 | struct passwd *pw = NULL; | 208 | struct passwd *pw = NULL; |
209 | setproctitle("%s", user); | 209 | setproctitle("%s", user); |
@@ -300,7 +300,7 @@ done: | |||
300 | return; | 300 | return; |
301 | } | 301 | } |
302 | 302 | ||
303 | void | 303 | void |
304 | userauth_reply(Authctxt *authctxt, int authenticated) | 304 | userauth_reply(Authctxt *authctxt, int authenticated) |
305 | { | 305 | { |
306 | char *methods; | 306 | char *methods; |
@@ -309,8 +309,8 @@ userauth_reply(Authctxt *authctxt, int authenticated) | |||
309 | if (authenticated) { | 309 | if (authenticated) { |
310 | #ifdef WITH_AIXAUTHENTICATE | 310 | #ifdef WITH_AIXAUTHENTICATE |
311 | /* We don't have a pty yet, so just label the line as "ssh" */ | 311 | /* We don't have a pty yet, so just label the line as "ssh" */ |
312 | if (loginsuccess(authctxt->user?authctxt->user:"NOUSER", | 312 | if (loginsuccess(authctxt->user?authctxt->user:"NOUSER", |
313 | get_canonical_hostname(options.reverse_mapping_check), | 313 | get_canonical_hostname(options.reverse_mapping_check), |
314 | "ssh", &aixloginmsg) < 0) | 314 | "ssh", &aixloginmsg) < 0) |
315 | aixloginmsg = NULL; | 315 | aixloginmsg = NULL; |
316 | #endif /* WITH_AIXAUTHENTICATE */ | 316 | #endif /* WITH_AIXAUTHENTICATE */ |
@@ -323,7 +323,7 @@ userauth_reply(Authctxt *authctxt, int authenticated) | |||
323 | authctxt->success = 1; | 323 | authctxt->success = 1; |
324 | } else { | 324 | } else { |
325 | if (authctxt->failures++ > AUTH_FAIL_MAX) | 325 | if (authctxt->failures++ > AUTH_FAIL_MAX) |
326 | packet_disconnect(AUTH_FAIL_MSG, authctxt->user); | 326 | packet_disconnect(AUTH_FAIL_MSG, authctxt->user); |
327 | methods = authmethods_get(); | 327 | methods = authmethods_get(); |
328 | packet_start(SSH2_MSG_USERAUTH_FAILURE); | 328 | packet_start(SSH2_MSG_USERAUTH_FAILURE); |
329 | packet_put_cstring(methods); | 329 | packet_put_cstring(methods); |
@@ -342,11 +342,11 @@ userauth_none(Authctxt *authctxt) | |||
342 | if (m != NULL) | 342 | if (m != NULL) |
343 | m->enabled = NULL; | 343 | m->enabled = NULL; |
344 | packet_done(); | 344 | packet_done(); |
345 | userauth_banner(); | 345 | userauth_banner(); |
346 | 346 | ||
347 | if (authctxt->valid == 0) | 347 | if (authctxt->valid == 0) |
348 | return(0); | 348 | return(0); |
349 | 349 | ||
350 | #ifdef HAVE_CYGWIN | 350 | #ifdef HAVE_CYGWIN |
351 | if (check_nt_auth(1, authctxt->pw->pw_uid) == 0) | 351 | if (check_nt_auth(1, authctxt->pw->pw_uid) == 0) |
352 | return(0); | 352 | return(0); |
@@ -354,9 +354,9 @@ userauth_none(Authctxt *authctxt) | |||
354 | #ifdef USE_PAM | 354 | #ifdef USE_PAM |
355 | return auth_pam_password(authctxt->pw, ""); | 355 | return auth_pam_password(authctxt->pw, ""); |
356 | #elif defined(HAVE_OSF_SIA) | 356 | #elif defined(HAVE_OSF_SIA) |
357 | return (sia_validate_user(NULL, saved_argc, saved_argv, | 357 | return (sia_validate_user(NULL, saved_argc, saved_argv, |
358 | get_canonical_hostname(options.reverse_mapping_check), | 358 | get_canonical_hostname(options.reverse_mapping_check), |
359 | authctxt->user?authctxt->user:"NOUSER", NULL, 0, | 359 | authctxt->user?authctxt->user:"NOUSER", NULL, 0, |
360 | NULL, "") == SIASUCCESS); | 360 | NULL, "") == SIASUCCESS); |
361 | #else /* !HAVE_OSF_SIA && !USE_PAM */ | 361 | #else /* !HAVE_OSF_SIA && !USE_PAM */ |
362 | return auth_password(authctxt->pw, ""); | 362 | return auth_password(authctxt->pw, ""); |
@@ -382,9 +382,9 @@ userauth_passwd(Authctxt *authctxt) | |||
382 | #ifdef USE_PAM | 382 | #ifdef USE_PAM |
383 | auth_pam_password(authctxt->pw, password) == 1) | 383 | auth_pam_password(authctxt->pw, password) == 1) |
384 | #elif defined(HAVE_OSF_SIA) | 384 | #elif defined(HAVE_OSF_SIA) |
385 | sia_validate_user(NULL, saved_argc, saved_argv, | 385 | sia_validate_user(NULL, saved_argc, saved_argv, |
386 | get_canonical_hostname(options.reverse_mapping_check), | 386 | get_canonical_hostname(options.reverse_mapping_check), |
387 | authctxt->user?authctxt->user:"NOUSER", NULL, 0, NULL, | 387 | authctxt->user?authctxt->user:"NOUSER", NULL, 0, NULL, |
388 | password) == SIASUCCESS) | 388 | password) == SIASUCCESS) |
389 | #else /* !USE_PAM && !HAVE_OSF_SIA */ | 389 | #else /* !USE_PAM && !HAVE_OSF_SIA */ |
390 | auth_password(authctxt->pw, password) == 1) | 390 | auth_password(authctxt->pw, password) == 1) |