Lines Matching defs:authctxt
96 extern struct sshauthopt *auth_opts; /* XXX move to permanent ssh->authctxt? */
125 static Authctxt *authctxt;
239 authctxt = (Authctxt *)ssh->authctxt;
240 memset(authctxt, 0, sizeof(*authctxt));
241 ssh->authctxt = authctxt;
254 auth2_authctxt_reset_info(authctxt);
266 !auth2_update_methods_lists(authctxt,
278 if (authctxt->pw->pw_uid == 0 &&
286 authctxt->failures++;
288 auth2_update_session_info(authctxt,
292 if (authctxt->failures > options.max_authtries) {
299 if (!authctxt->valid)
304 debug_f("user %s authenticated by privileged process", authctxt->user);
306 ssh->authctxt = NULL;
307 ssh_packet_set_log_preamble(ssh, "user %s", authctxt->user);
572 postauth = (authctxt && authctxt->pw && authctxt->authenticated);
772 if (authctxt->attempt++ != 0)
775 if ((r = sshbuf_get_cstring(m, &authctxt->user, NULL)) != 0)
778 pwent = getpwnamallow(ssh, authctxt->user);
780 setproctitle("%s [priv]", pwent ? authctxt->user : "unknown");
787 authctxt->pw = fakepw();
792 authctxt->pw = pwent;
793 authctxt->valid = 1;
812 authctxt->valid ? "authenticating" : "invalid ", authctxt->user);
817 authctxt->valid ? "" : "invalid user ",
818 authctxt->user, ssh_remote_ipaddr(ssh),
827 if (auth2_setup_methods_lists(authctxt) != 0) {
868 if ((r = sshbuf_get_cstring(m, &authctxt->service, NULL)) != 0 ||
869 (r = sshbuf_get_cstring(m, &authctxt->style, NULL)) != 0)
871 debug3_f("service=%s, style=%s", authctxt->service, authctxt->style);
873 if (strlen(authctxt->style) == 0) {
874 free(authctxt->style);
875 authctxt->style = NULL;
925 success = bsdauth_query(authctxt, &name, &infotxt, &numprompts,
957 if (authctxt->as == NULL)
963 auth_userresponse(authctxt->as, response, 0);
964 authctxt->as = NULL;
1028 if (key != NULL && authctxt->valid) {
1034 if (auth2_key_already_used(authctxt, key))
1039 allowed = user_key_allowed(ssh, authctxt->pw, key,
1046 if (auth2_key_already_used(authctxt, key))
1051 allowed = hostbased_key_allowed(ssh, authctxt->pw,
1053 auth2_record_info(authctxt,
1065 (key == NULL || !authctxt->valid) ? "invalid" : sshkey_type(key),
1068 auth2_record_key(authctxt, 0, key);
1139 xasprintf(&userstyle, "%s%s%s", authctxt->user,
1140 authctxt->style ? ":" : "",
1141 authctxt->style ? authctxt->style : "");
1210 xasprintf(&userstyle, "%s%s%s", authctxt->user,
1211 authctxt->style ? ":" : "",
1212 authctxt->style ? authctxt->style : "");
1323 authctxt->valid ? "" : "invalid user ",
1324 authctxt->user, ssh_remote_ipaddr(ssh),
1335 authctxt->valid ? "" : "invalid user ",
1336 authctxt->user, ssh_remote_ipaddr(ssh),
1341 auth2_record_key(authctxt, ret == 0, key);
1418 s->authctxt = authctxt;
1419 s->pw = authctxt->pw;
1424 pty_setowner(authctxt->pw, s->tty);
1434 mm_record_login(ssh, s, authctxt->pw);
1742 authenticated = authctxt->valid && ssh_gssapi_userok(authctxt->user);
1754 auth2_record_info(authctxt, "%s", displayname);