Lines Matching refs:authctxt
74 do_authloop(Authctxt *authctxt) in do_authloop() argument
85 struct passwd *pw = authctxt->pw; in do_authloop()
88 authctxt->valid ? "" : "illegal user ", authctxt->user); in do_authloop()
95 auth_password(authctxt, "")) { in do_authloop()
96 auth_log(authctxt, 1, "without authentication", ""); in do_authloop()
114 authctxt->v1_auth_type = type = packet_read(); in do_authloop()
115 authctxt->v1_auth_name = get_authname(type); in do_authloop()
117 authctxt->attempt++; in do_authloop()
137 if (auth_krb4(authctxt, &tkt, in do_authloop()
158 if (auth_krb5(authctxt, &tkt, in do_authloop()
261 authctxt->init_attempt++; in do_authloop()
276 if (authctxt->init_failures < in do_authloop()
279 auth_password(authctxt, password); in do_authloop()
288 char *challenge = get_challenge(authctxt); in do_authloop()
306 authenticated = verify_response(authctxt, response); in do_authloop()
321 if (authctxt->as) { in do_authloop()
322 auth_close(authctxt->as); in do_authloop()
323 authctxt->as = NULL; in do_authloop()
326 if (!authctxt->valid && authenticated) { in do_authloop()
329 authctxt->user); in do_authloop()
334 cray_login_failure(authctxt->user, IA_UDBERR); in do_authloop()
335 if (authenticated && cray_access_denied(authctxt->user)) { in do_authloop()
337 fatal("Access denied for user %s.",authctxt->user); in do_authloop()
350 if (authenticated && authctxt->pw->pw_uid == 0 && in do_authloop()
356 authenticated = do_pam_non_initial_userauth(authctxt); in do_authloop()
357 else if (authenticated && !AUTHPAM_DONE(authctxt)) in do_authloop()
361 authctxt->pam_retval = AUTHPAM_ERROR(authctxt, in do_authloop()
366 auth_log(authctxt, authenticated, get_authname(type), info); in do_authloop()
377 authctxt->init_failures++; in do_authloop()
379 if (authctxt->failures++ > options.max_auth_tries) { in do_authloop()
382 authctxt); in do_authloop()
384 authctxt->user); in do_authloop()
386 packet_disconnect(AUTH_FAIL_MSG, authctxt->user); in do_authloop()
402 Authctxt *authctxt; in do_authentication() local
426 authctxt = authctxt_new(); in do_authentication()
427 authctxt->user = user; in do_authentication()
428 authctxt->style = style; in do_authentication()
431 fatal_add_cleanup(audit_failed_login_cleanup, authctxt); in do_authentication()
435 if ((authctxt->pw = getpwnamallow(user)) != NULL) { in do_authentication()
436 authctxt->valid = 1; in do_authentication()
438 authctxt->valid = 0; in do_authentication()
442 setproctitle("%s", authctxt->pw ? user : "unknown"); in do_authentication()
449 if (getuid() != 0 && authctxt->pw && in do_authentication()
450 authctxt->pw->pw_uid != getuid()) in do_authentication()
458 do_authloop(authctxt); in do_authentication()
465 return (authctxt); in do_authentication()