Lines Matching refs:authctxt
151 static Authctxt *authctxt; variable
280 authctxt = (Authctxt *)ssh->authctxt; in monitor_child_preauth()
281 memset(authctxt, 0, sizeof(*authctxt)); in monitor_child_preauth()
282 ssh->authctxt = authctxt; in monitor_child_preauth()
284 authctxt->loginmsg = loginmsg; in monitor_child_preauth()
296 auth2_authctxt_reset_info(authctxt); in monitor_child_preauth()
308 !auth2_update_methods_lists(authctxt, in monitor_child_preauth()
320 if (authctxt->pw->pw_uid == 0 && in monitor_child_preauth()
343 authctxt->failures++; in monitor_child_preauth()
345 auth2_update_session_info(authctxt, in monitor_child_preauth()
349 if (authctxt->failures > options.max_authtries) { in monitor_child_preauth()
356 if (!authctxt->valid) in monitor_child_preauth()
361 debug_f("user %s authenticated by privileged process", authctxt->user); in monitor_child_preauth()
363 ssh->authctxt = NULL; in monitor_child_preauth()
364 ssh_packet_set_log_preamble(ssh, "user %s", authctxt->user); in monitor_child_preauth()
751 if (authctxt->attempt++ != 0) in mm_answer_pwnamallow()
754 if ((r = sshbuf_get_cstring(m, &authctxt->user, NULL)) != 0) in mm_answer_pwnamallow()
757 pwent = getpwnamallow(ssh, authctxt->user); in mm_answer_pwnamallow()
759 setproctitle("%s [priv]", pwent ? authctxt->user : "unknown"); in mm_answer_pwnamallow()
766 authctxt->pw = fakepw(); in mm_answer_pwnamallow()
771 authctxt->pw = pwent; in mm_answer_pwnamallow()
772 authctxt->valid = 1; in mm_answer_pwnamallow()
799 authctxt->valid ? "authenticating" : "invalid ", authctxt->user); in mm_answer_pwnamallow()
804 authctxt->valid ? "" : "invalid user ", in mm_answer_pwnamallow()
805 authctxt->user, ssh_remote_ipaddr(ssh), in mm_answer_pwnamallow()
814 if (auth2_setup_methods_lists(authctxt) != 0) { in mm_answer_pwnamallow()
860 if ((r = sshbuf_get_cstring(m, &authctxt->service, NULL)) != 0 || in mm_answer_authserv()
861 (r = sshbuf_get_cstring(m, &authctxt->style, NULL)) != 0) in mm_answer_authserv()
863 debug3_f("service=%s, style=%s", authctxt->service, authctxt->style); in mm_answer_authserv()
865 if (strlen(authctxt->style) == 0) { in mm_answer_authserv()
866 free(authctxt->style); in mm_answer_authserv()
867 authctxt->style = NULL; in mm_answer_authserv()
952 success = bsdauth_query(authctxt, &name, &infotxt, &numprompts, in mm_answer_bsdauthquery()
984 if (authctxt->as == NULL) in mm_answer_bsdauthrespond()
990 auth_userresponse(authctxt->as, response, 0); in mm_answer_bsdauthrespond()
991 authctxt->as = NULL; in mm_answer_bsdauthrespond()
1059 sshpam_ctxt = (sshpam_device.init_ctx)(authctxt); in mm_answer_pam_init_ctx()
1194 if (key != NULL && authctxt->valid) { in mm_answer_keyallowed()
1200 if (auth2_key_already_used(authctxt, key)) in mm_answer_keyallowed()
1205 allowed = user_key_allowed(ssh, authctxt->pw, key, in mm_answer_keyallowed()
1212 if (auth2_key_already_used(authctxt, key)) in mm_answer_keyallowed()
1217 allowed = hostbased_key_allowed(ssh, authctxt->pw, in mm_answer_keyallowed()
1219 auth2_record_info(authctxt, in mm_answer_keyallowed()
1231 (key == NULL || !authctxt->valid) ? "invalid" : sshkey_type(key), in mm_answer_keyallowed()
1234 auth2_record_key(authctxt, 0, key); in mm_answer_keyallowed()
1305 xasprintf(&userstyle, "%s%s%s", authctxt->user, in monitor_valid_userblob()
1306 authctxt->style ? ":" : "", in monitor_valid_userblob()
1307 authctxt->style ? authctxt->style : ""); in monitor_valid_userblob()
1376 xasprintf(&userstyle, "%s%s%s", authctxt->user, in monitor_valid_hostbasedblob()
1377 authctxt->style ? ":" : "", in monitor_valid_hostbasedblob()
1378 authctxt->style ? authctxt->style : ""); in monitor_valid_hostbasedblob()
1489 authctxt->valid ? "" : "invalid user ", in mm_answer_keyverify()
1490 authctxt->user, ssh_remote_ipaddr(ssh), in mm_answer_keyverify()
1501 authctxt->valid ? "" : "invalid user ", in mm_answer_keyverify()
1502 authctxt->user, ssh_remote_ipaddr(ssh), in mm_answer_keyverify()
1507 auth2_record_key(authctxt, ret == 0, key); in mm_answer_keyverify()
1584 s->authctxt = authctxt; in mm_answer_pty()
1585 s->pw = authctxt->pw; in mm_answer_pty()
1590 pty_setowner(authctxt->pw, s->tty); in mm_answer_pty()
1600 mm_record_login(ssh, s, authctxt->pw); in mm_answer_pty()
1964 authenticated = authctxt->valid && ssh_gssapi_userok(authctxt->user); in mm_answer_gss_userok()
1976 auth2_record_info(authctxt, "%s", displayname); in mm_answer_gss_userok()