/external/openssh/ |
D | auth-krb5.c | 60 Authctxt *authctxt = (Authctxt *)context; in krb5_init() local 63 if (authctxt->krb5_ctx == NULL) { in krb5_init() 64 problem = krb5_init_context(&authctxt->krb5_ctx); in krb5_init() 72 auth_krb5_password(Authctxt *authctxt, const char *password) in auth_krb5_password() argument 85 platform_client = platform_krb5_get_principal_name(authctxt->pw->pw_name); in auth_krb5_password() 86 client = platform_client ? platform_client : authctxt->pw->pw_name; in auth_krb5_password() 88 temporarily_use_uid(authctxt->pw); in auth_krb5_password() 90 problem = krb5_init(authctxt); in auth_krb5_password() 94 problem = krb5_parse_name(authctxt->krb5_ctx, client, in auth_krb5_password() 95 &authctxt->krb5_user); in auth_krb5_password() [all …]
|
D | auth2.c | 98 static char *authmethods_get(Authctxt *authctxt); 174 Authctxt *authctxt = ssh->authctxt; in do_authentication2() local 178 ssh_dispatch_run_fatal(ssh, DISPATCH_BLOCK, &authctxt->success); in do_authentication2() 179 ssh->authctxt = NULL; in do_authentication2() 186 Authctxt *authctxt = ssh->authctxt; in input_service_request() local 194 if (authctxt == NULL) in input_service_request() 198 if (!authctxt->success) { in input_service_request() 264 Authctxt *authctxt = ssh->authctxt; in input_userauth_request() local 270 if (authctxt == NULL) in input_userauth_request() 278 debug("attempt %d failures %d", authctxt->attempt, authctxt->failures); in input_userauth_request() [all …]
|
D | auth-bsdauth.c | 45 bsdauth_init_ctx(Authctxt *authctxt) in bsdauth_init_ctx() argument 47 return authctxt; in bsdauth_init_ctx() 54 Authctxt *authctxt = ctx; in bsdauth_query() local 62 if (authctxt->as != NULL) { in bsdauth_query() 64 challenge = auth_getitem(authctxt->as, AUTHV_CHALLENGE); in bsdauth_query() 66 auth_close(authctxt->as); in bsdauth_query() 67 authctxt->as = NULL; in bsdauth_query() 74 authctxt->style ? authctxt->style : "<default>"); in bsdauth_query() 75 authctxt->as = auth_userchallenge(authctxt->user, in bsdauth_query() 76 authctxt->style, "auth-ssh", &challenge); in bsdauth_query() [all …]
|
D | sshconnect2.c | 387 Authctxt authctxt; in ssh_userauth2() local 396 memset(&authctxt, 0, sizeof(authctxt)); in ssh_userauth2() 397 authctxt.server_user = server_user; in ssh_userauth2() 398 authctxt.local_user = local_user; in ssh_userauth2() 399 authctxt.host = host; in ssh_userauth2() 400 authctxt.service = "ssh-connection"; /* service name */ in ssh_userauth2() 401 authctxt.success = 0; in ssh_userauth2() 402 authctxt.method = authmethod_lookup("none"); in ssh_userauth2() 403 authctxt.authlist = NULL; in ssh_userauth2() 404 authctxt.methoddata = NULL; in ssh_userauth2() [all …]
|
D | auth-passwd.c | 79 Authctxt *authctxt = ssh->authctxt; in auth_password() local 80 struct passwd *pw = authctxt->pw; in auth_password() 81 int result, ok = authctxt->valid; in auth_password() 98 int ret = auth_krb5_password(authctxt, password); in auth_password() 116 return (sshpam_auth_passwd(authctxt, password) && ok); in auth_password() 121 if (auth_shadow_pwexpired(authctxt)) in auth_password() 122 authctxt->force_pwchange = 1; in auth_password() 126 if (authctxt->force_pwchange) in auth_password() 133 warn_expiry(Authctxt *authctxt, auth_session_t *as) in warn_expiry() argument 143 if (authctxt->valid) { in warn_expiry() [all …]
|
D | auth2-gss.c | 64 Authctxt *authctxt = ssh->authctxt; in userauth_gssapi() local 102 authctxt->server_caused_failure = 1; in userauth_gssapi() 106 if (!authctxt->valid || authctxt->user == NULL) { in userauth_gssapi() 116 authctxt->server_caused_failure = 1; in userauth_gssapi() 120 authctxt->methoddata = (void *)ctxt; in userauth_gssapi() 132 authctxt->postponed = 1; in userauth_gssapi() 140 Authctxt *authctxt = ssh->authctxt; in input_gssapi_token() local 149 if (authctxt == NULL || (authctxt->methoddata == NULL && !use_privsep)) in input_gssapi_token() 152 gssctxt = authctxt->methoddata; in input_gssapi_token() 173 authctxt->postponed = 0; in input_gssapi_token() [all …]
|
D | auth2-chall.c | 154 kbdint_next_device(Authctxt *authctxt, KbdintAuthctxt *kbdintctxt) in kbdint_next_device() argument 170 !auth2_method_allowed(authctxt, in kbdint_next_device() 196 Authctxt *authctxt = ssh->authctxt; in auth2_challenge() local 198 authctxt->user ? authctxt->user : "<nouser>", in auth2_challenge() 201 if (authctxt->user == NULL || !devs) in auth2_challenge() 203 if (authctxt->kbdintctxt == NULL) in auth2_challenge() 204 authctxt->kbdintctxt = kbdint_alloc(devs); in auth2_challenge() 212 Authctxt *authctxt = ssh->authctxt; in auth2_challenge_stop() local 215 if (authctxt->kbdintctxt != NULL) { in auth2_challenge_stop() 216 kbdint_free(authctxt->kbdintctxt); in auth2_challenge_stop() [all …]
|
D | monitor.c | 158 static Authctxt *authctxt; variable 286 authctxt = (Authctxt *)ssh->authctxt; in monitor_child_preauth() 287 memset(authctxt, 0, sizeof(*authctxt)); in monitor_child_preauth() 288 ssh->authctxt = authctxt; in monitor_child_preauth() 290 authctxt->loginmsg = loginmsg; in monitor_child_preauth() 302 auth2_authctxt_reset_info(authctxt); in monitor_child_preauth() 310 !auth2_update_methods_lists(authctxt, in monitor_child_preauth() 323 if (authctxt->pw->pw_uid == 0 && in monitor_child_preauth() 346 authctxt->failures++; in monitor_child_preauth() 348 auth2_update_session_info(authctxt, in monitor_child_preauth() [all …]
|
D | auth-sia.c | 58 Authctxt *authctxt = ssh->authctxt; in sys_auth_passwd() local 62 if (!authctxt->user || pass == NULL || pass[0] == '\0') in sys_auth_passwd() 65 if (sia_ses_init(&ent, saved_argc, saved_argv, host, authctxt->user, in sys_auth_passwd() 71 authctxt->user, host); in sys_auth_passwd()
|
D | auth2-hostbased.c | 63 Authctxt *authctxt = ssh->authctxt; in userauth_hostbased() local 124 if (!authctxt->valid || authctxt->user == NULL) { in userauth_hostbased() 134 (r = sshbuf_put_cstring(b, authctxt->user)) != 0 || in userauth_hostbased() 135 (r = sshbuf_put_cstring(b, authctxt->service)) != 0 || in userauth_hostbased() 146 auth2_record_info(authctxt, in userauth_hostbased() 151 if (PRIVSEP(hostbased_key_allowed(ssh, authctxt->pw, cuser, in userauth_hostbased() 157 auth2_record_key(authctxt, authenticated, key); in userauth_hostbased()
|
D | auth.c | 275 format_method_key(Authctxt *authctxt) in format_method_key() argument 277 const struct sshkey *key = authctxt->auth_method_key; in format_method_key() 278 const char *methinfo = authctxt->auth_method_info; in format_method_key() 315 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in auth_log() local 320 if (use_privsep && !mm_is_monitor() && !authctxt->postponed) in auth_log() 325 !authctxt->valid || in auth_log() 326 authctxt->failures >= options.max_authtries / 2 || in auth_log() 330 if (authctxt->postponed) in auth_log() 337 if ((extra = format_method_key(authctxt)) == NULL) { in auth_log() 338 if (authctxt->auth_method_info != NULL) in auth_log() [all …]
|
D | auth.h | 145 void auth2_record_info(Authctxt *authctxt, const char *, ...) 151 int auth_krb5(Authctxt *authctxt, krb5_data *auth, char **client, krb5_data *); 152 int auth_krb5_tgt(Authctxt *authctxt, krb5_data *tgt); 153 int auth_krb5_password(Authctxt *authctxt, const char *password); 154 void krb5_cleanup_proc(Authctxt *authctxt);
|
D | auth2-pubkey.c | 92 Authctxt *authctxt = ssh->authctxt; in userauth_pubkey() local 93 struct passwd *pw = authctxt->pw; in userauth_pubkey() 118 authctxt->valid ? "valid" : "invalid", authctxt->user, in userauth_pubkey() 150 if (auth2_key_already_used(authctxt, key)) { in userauth_pubkey() 191 if (!authctxt->valid || authctxt->user == NULL) { in userauth_pubkey() 197 xasprintf(&userstyle, "%s%s%s", authctxt->user, in userauth_pubkey() 198 authctxt->style ? ":" : "", in userauth_pubkey() 199 authctxt->style ? authctxt->style : ""); in userauth_pubkey() 202 (r = sshbuf_put_cstring(b, authctxt->service)) != 0 || in userauth_pubkey() 222 auth2_record_info(authctxt, "signature count = %u", in userauth_pubkey() [all …]
|
D | auth-pam.c | 683 sshpam_init(struct ssh *ssh, Authctxt *authctxt) in sshpam_init() argument 685 const char *pam_user, *user = authctxt->user; in sshpam_init() 705 sshpam_authctxt = authctxt; in sshpam_init() 778 sshpam_init_ctx(Authctxt *authctxt) in sshpam_init_ctx() argument 792 if (sshpam_init(NULL, authctxt) == -1) { in sshpam_init_ctx() 1038 Authctxt *authctxt = (Authctxt *)ssh->authctxt; in start_pam() local 1043 if (sshpam_init(ssh, authctxt) == -1) in start_pam() 1326 sshpam_auth_passwd(Authctxt *authctxt, const char *password) in sshpam_auth_passwd() argument 1337 sshpam_authctxt = authctxt; in sshpam_auth_passwd() 1344 if (!authctxt->valid || (authctxt->pw->pw_uid == 0 && in sshpam_auth_passwd() [all …]
|
D | session.c | 337 do_authenticated(struct ssh *ssh, Authctxt *authctxt) in do_authenticated() argument 339 setproctitle("%s", authctxt->pw->pw_name); in do_authenticated() 363 prepare_auth_info_file(authctxt->pw, authctxt->session_info); in do_authenticated() 365 do_authenticated2(ssh, authctxt); in do_authenticated() 367 do_cleanup(ssh, authctxt); in do_authenticated() 776 if (options.use_pam && !use_privsep && s->authctxt->force_pwchange) { in do_login() 779 s->authctxt->force_pwchange = 0; in do_login() 1100 if (s->authctxt->krb5_ccname) in do_setup_env() 1102 s->authctxt->krb5_ccname); in do_setup_env() 1533 if (s->authctxt->force_pwchange) { in do_child() [all …]
|
D | sshd.c | 551 privsep_postauth(struct ssh *ssh, Authctxt *authctxt) argument 556 if (authctxt->pw->pw_uid == 0) { 590 do_setusercontext(authctxt->pw); 1503 Authctxt *authctxt; local 2167 authctxt = xcalloc(1, sizeof(*authctxt)); 2168 ssh->authctxt = authctxt; 2170 authctxt->loginmsg = loginmsg; 2173 the_authctxt = authctxt; 2216 authctxt->authenticated = 1; 2228 temporarily_use_uid(authctxt->pw); [all …]
|
D | session.h | 36 Authctxt *authctxt; member
|
D | packet.h | 82 void *authctxt; member
|
D | monitor_wrap.c | 687 mm_sshpam_init_ctx(Authctxt *authctxt) in mm_sshpam_init_ctx() argument 707 return (authctxt); in mm_sshpam_init_ctx()
|
D | serverloop.c | 398 server_loop2(struct ssh *ssh, Authctxt *authctxt) in server_loop2() argument
|
/external/openssh/openbsd-compat/ |
D | port-uw.c | 55 Authctxt *authctxt = ssh->authctxt; in sys_auth_passwd() local 56 struct passwd *pw = authctxt->pw; in sys_auth_passwd() 61 char *pw_password = authctxt->valid ? shadow_pw(pw) : pw->pw_passwd; in sys_auth_passwd() 87 if (authctxt->valid) in sys_auth_passwd()
|
D | port-aix.c | 178 Authctxt *ctxt = ssh->authctxt; in sys_auth_passwd()
|