/external/openssh/ |
D | auth-krb5.c | 61 Authctxt *authctxt = (Authctxt *)context; in krb5_init() local 64 if (authctxt->krb5_ctx == NULL) { in krb5_init() 65 problem = krb5_init_context(&authctxt->krb5_ctx); in krb5_init() 73 auth_krb5_password(Authctxt *authctxt, const char *password) in auth_krb5_password() argument 86 platform_client = platform_krb5_get_principal_name(authctxt->pw->pw_name); in auth_krb5_password() 87 client = platform_client ? platform_client : authctxt->pw->pw_name; in auth_krb5_password() 89 temporarily_use_uid(authctxt->pw); in auth_krb5_password() 91 problem = krb5_init(authctxt); in auth_krb5_password() 95 problem = krb5_parse_name(authctxt->krb5_ctx, client, in auth_krb5_password() 96 &authctxt->krb5_user); in auth_krb5_password() [all …]
|
D | auth2.c | 95 static char *authmethods_get(Authctxt *authctxt); 169 do_authentication2(Authctxt *authctxt) in do_authentication2() argument 173 dispatch_run(DISPATCH_BLOCK, &authctxt->success, authctxt); in do_authentication2() 180 Authctxt *authctxt = ctxt; in input_service_request() local 186 if (authctxt == NULL) in input_service_request() 190 if (!authctxt->success) { in input_service_request() 215 Authctxt *authctxt = ctxt; in input_userauth_request() local 220 if (authctxt == NULL) in input_userauth_request() 227 debug("attempt %d failures %d", authctxt->attempt, authctxt->failures); in input_userauth_request() 232 if (authctxt->attempt++ == 0) { in input_userauth_request() [all …]
|
D | auth1.c | 118 auth1_process_password(Authctxt *authctxt) in auth1_process_password() argument 133 authenticated = PRIVSEP(auth_password(authctxt, password)); in auth1_process_password() 143 auth1_process_rsa(Authctxt *authctxt) in auth1_process_rsa() argument 153 authenticated = auth_rsa(authctxt, n); in auth1_process_rsa() 161 auth1_process_rhosts_rsa(Authctxt *authctxt) in auth1_process_rhosts_rsa() argument 189 authenticated = auth_rhosts_rsa(authctxt, client_user, in auth1_process_rhosts_rsa() 193 auth_info(authctxt, "ruser %.100s", client_user); in auth1_process_rhosts_rsa() 200 auth1_process_tis_challenge(Authctxt *authctxt) in auth1_process_tis_challenge() argument 204 if ((challenge = get_challenge(authctxt)) == NULL) in auth1_process_tis_challenge() 219 auth1_process_tis_response(Authctxt *authctxt) in auth1_process_tis_response() argument [all …]
|
D | auth-bsdauth.c | 47 bsdauth_init_ctx(Authctxt *authctxt) in bsdauth_init_ctx() argument 49 return authctxt; in bsdauth_init_ctx() 56 Authctxt *authctxt = ctx; in bsdauth_query() local 64 if (authctxt->as != NULL) { in bsdauth_query() 66 challenge = auth_getitem(authctxt->as, AUTHV_CHALLENGE); in bsdauth_query() 68 auth_close(authctxt->as); in bsdauth_query() 69 authctxt->as = NULL; in bsdauth_query() 76 authctxt->style ? authctxt->style : "<default>"); in bsdauth_query() 77 authctxt->as = auth_userchallenge(authctxt->user, in bsdauth_query() 78 authctxt->style, "auth-ssh", &challenge); in bsdauth_query() [all …]
|
D | sshconnect2.c | 288 int (*userauth)(Authctxt *authctxt); 289 void (*cleanup)(Authctxt *authctxt); 310 int userauth_gssapi(Authctxt *authctxt); 369 Authctxt authctxt; in ssh_userauth2() local 397 memset(&authctxt, 0, sizeof(authctxt)); in ssh_userauth2() 398 pubkey_prepare(&authctxt); in ssh_userauth2() 399 authctxt.server_user = server_user; in ssh_userauth2() 400 authctxt.local_user = local_user; in ssh_userauth2() 401 authctxt.host = host; in ssh_userauth2() 402 authctxt.service = "ssh-connection"; /* service name */ in ssh_userauth2() [all …]
|
D | auth2-gss.c | 61 userauth_gssapi(Authctxt *authctxt) in userauth_gssapi() argument 71 if (!authctxt->valid || authctxt->user == NULL) in userauth_gssapi() 100 authctxt->server_caused_failure = 1; in userauth_gssapi() 108 authctxt->server_caused_failure = 1; in userauth_gssapi() 112 authctxt->methoddata = (void *)ctxt; in userauth_gssapi() 124 authctxt->postponed = 1; in userauth_gssapi() 132 Authctxt *authctxt = ctxt; in input_gssapi_token() local 139 if (authctxt == NULL || (authctxt->methoddata == NULL && !use_privsep)) in input_gssapi_token() 142 gssctxt = authctxt->methoddata; in input_gssapi_token() 159 authctxt->postponed = 0; in input_gssapi_token() [all …]
|
D | auth2-chall.c | 157 kbdint_next_device(Authctxt *authctxt, KbdintAuthctxt *kbdintctxt) in kbdint_next_device() argument 172 if (!auth2_method_allowed(authctxt, in kbdint_next_device() 193 auth2_challenge(Authctxt *authctxt, char *devs) in auth2_challenge() argument 196 authctxt->user ? authctxt->user : "<nouser>", in auth2_challenge() 199 if (authctxt->user == NULL || !devs) in auth2_challenge() 201 if (authctxt->kbdintctxt == NULL) in auth2_challenge() 202 authctxt->kbdintctxt = kbdint_alloc(devs); in auth2_challenge() 203 return auth2_challenge_start(authctxt); in auth2_challenge() 208 auth2_challenge_stop(Authctxt *authctxt) in auth2_challenge_stop() argument 212 if (authctxt->kbdintctxt != NULL) { in auth2_challenge_stop() [all …]
|
D | auth-chall.c | 50 get_challenge(Authctxt *authctxt) in get_challenge() argument 64 if ((authctxt->kbdintctxt = device->init_ctx(authctxt)) == NULL) in get_challenge() 66 if (device->query(authctxt->kbdintctxt, &name, &info, in get_challenge() 68 device->free_ctx(authctxt->kbdintctxt); in get_challenge() 69 authctxt->kbdintctxt = NULL; in get_challenge() 85 verify_response(Authctxt *authctxt, const char *response) in verify_response() argument 93 if (authctxt->kbdintctxt == NULL) in verify_response() 96 switch (device->respond(authctxt->kbdintctxt, 1, resp)) { in verify_response() 101 if ((device->query(authctxt->kbdintctxt, &name, &info, in verify_response() 105 device->respond(authctxt->kbdintctxt, 0, resp) == 0) in verify_response() [all …]
|
D | auth-passwd.c | 82 auth_password(Authctxt *authctxt, const char *password) in auth_password() argument 84 struct passwd * pw = authctxt->pw; in auth_password() 85 int result, ok = authctxt->valid; in auth_password() 99 int ret = auth_krb5_password(authctxt, password); in auth_password() 117 return (sshpam_auth_passwd(authctxt, password) && ok); in auth_password() 122 if (auth_shadow_pwexpired(authctxt)) in auth_password() 123 authctxt->force_pwchange = 1; in auth_password() 126 result = sys_auth_passwd(authctxt, password); in auth_password() 127 if (authctxt->force_pwchange) in auth_password() 134 warn_expiry(Authctxt *authctxt, auth_session_t *as) in warn_expiry() argument [all …]
|
D | auth-skey.c | 46 skey_init_ctx(Authctxt *authctxt) in skey_init_ctx() argument 48 return authctxt; in skey_init_ctx() 55 Authctxt *authctxt = ctx; in skey_query() local 59 if (_compat_skeychallenge(&skey, authctxt->user, challenge, in skey_query() 77 Authctxt *authctxt = ctx; in skey_respond() local 79 if (authctxt->valid && in skey_respond() 81 skey_haskey(authctxt->pw->pw_name) == 0 && in skey_respond() 82 skey_passcheck(authctxt->pw->pw_name, responses[0]) != -1) in skey_respond()
|
D | auth2-pubkey.c | 75 userauth_pubkey(Authctxt *authctxt) in userauth_pubkey() argument 85 if (!authctxt->valid) { in userauth_pubkey() 126 if (auth2_userkey_already_used(authctxt, key)) { in userauth_pubkey() 148 xasprintf(&userstyle, "%s%s%s", authctxt->user, in userauth_pubkey() 149 authctxt->style ? ":" : "", in userauth_pubkey() 150 authctxt->style ? authctxt->style : ""); in userauth_pubkey() 156 authctxt->service); in userauth_pubkey() 168 pubkey_auth_info(authctxt, key, NULL); in userauth_pubkey() 172 if (PRIVSEP(user_key_allowed(authctxt->pw, key)) && in userauth_pubkey() 177 auth2_record_userkey(authctxt, key); in userauth_pubkey() [all …]
|
D | auth.c | 257 auth_info(Authctxt *authctxt, const char *fmt, ...) in auth_info() argument 262 free(authctxt->info); in auth_info() 263 authctxt->info = NULL; in auth_info() 266 i = vasprintf(&authctxt->info, fmt, ap); in auth_info() 269 if (i < 0 || authctxt->info == NULL) in auth_info() 274 auth_log(Authctxt *authctxt, int authenticated, int partial, in auth_log() argument 280 if (use_privsep && !mm_is_monitor() && !authctxt->postponed) in auth_log() 285 !authctxt->valid || in auth_log() 286 authctxt->failures >= options.max_authtries / 2 || in auth_log() 290 if (authctxt->postponed) in auth_log() [all …]
|
D | monitor.c | 169 static Authctxt *authctxt; variable 345 authctxt = _authctxt; in monitor_child_preauth() 346 memset(authctxt, 0, sizeof(*authctxt)); in monitor_child_preauth() 348 authctxt->loginmsg = &loginmsg; in monitor_child_preauth() 375 !auth2_update_methods_lists(authctxt, in monitor_child_preauth() 388 if (authctxt->pw->pw_uid == 0 && in monitor_child_preauth() 405 auth_log(authctxt, authenticated, partial, in monitor_child_preauth() 408 authctxt->failures++; in monitor_child_preauth() 412 if (!authctxt->valid) in monitor_child_preauth() 418 __func__, authctxt->user); in monitor_child_preauth() [all …]
|
D | auth-sia.c | 53 sys_auth_passwd(Authctxt *authctxt, const char *pass) in sys_auth_passwd() argument 61 if (!authctxt->user || pass == NULL || pass[0] == '\0') in sys_auth_passwd() 64 if (sia_ses_init(&ent, saved_argc, saved_argv, host, authctxt->user, in sys_auth_passwd() 70 authctxt->user, host); in sys_auth_passwd()
|
D | auth.h | 94 int (*userauth)(Authctxt *authctxt); 140 int auth_krb5(Authctxt *authctxt, krb5_data *auth, char **client, krb5_data *); 141 int auth_krb5_tgt(Authctxt *authctxt, krb5_data *tgt); 142 int auth_krb5_password(Authctxt *authctxt, const char *password); 143 void krb5_cleanup_proc(Authctxt *authctxt); 161 void auth_info(Authctxt *authctxt, const char *, ...)
|
D | auth2-hostbased.c | 59 userauth_hostbased(Authctxt *authctxt) in userauth_hostbased() argument 69 if (!authctxt->valid) { in userauth_hostbased() 120 authctxt->service; in userauth_hostbased() 125 buffer_put_cstring(&b, authctxt->user); in userauth_hostbased() 136 pubkey_auth_info(authctxt, key, in userauth_hostbased() 141 if (PRIVSEP(hostbased_key_allowed(authctxt->pw, cuser, chost, key)) && in userauth_hostbased()
|
D | auth-rh-rsa.c | 69 auth_rhosts_rsa(Authctxt *authctxt, char *cuser, Key *client_host_key) in auth_rhosts_rsa() argument 72 struct passwd *pw = authctxt->pw; in auth_rhosts_rsa() 77 if (!authctxt->valid || client_host_key == NULL || in auth_rhosts_rsa()
|
D | session.c | 254 do_authenticated(Authctxt *authctxt) in do_authenticated() argument 256 setproctitle("%s", authctxt->pw->pw_name); in do_authenticated() 269 do_authenticated2(authctxt); in do_authenticated() 271 do_authenticated1(authctxt); in do_authenticated() 273 do_cleanup(authctxt); in do_authenticated() 283 do_authenticated1(Authctxt *authctxt) in do_authenticated1() argument 296 s->authctxt = authctxt; in do_authenticated1() 297 s->pw = authctxt->pw; in do_authenticated1() 888 if (options.use_pam && !use_privsep && s->authctxt->force_pwchange) { in do_login() 891 s->authctxt->force_pwchange = 0; in do_login() [all …]
|
D | auth-pam.c | 621 sshpam_init(Authctxt *authctxt) in sshpam_init() argument 624 const char *pam_rhost, *pam_user, *user = authctxt->user; in sshpam_init() 639 sshpam_authctxt = authctxt; in sshpam_init() 672 sshpam_init_ctx(Authctxt *authctxt) in sshpam_init_ctx() argument 686 if (sshpam_init(authctxt) == -1) { in sshpam_init_ctx() 884 start_pam(Authctxt *authctxt) in start_pam() argument 889 if (sshpam_init(authctxt) == -1) in start_pam() 1179 sshpam_auth_passwd(Authctxt *authctxt, const char *password) in sshpam_auth_passwd() argument 1189 sshpam_authctxt = authctxt; in sshpam_auth_passwd() 1196 if (!authctxt->valid || (authctxt->pw->pw_uid == 0 && in sshpam_auth_passwd() [all …]
|
D | auth2-none.c | 62 userauth_none(Authctxt *authctxt) in userauth_none() argument 70 return (PRIVSEP(auth_password(authctxt, ""))); in userauth_none()
|
D | auth2-kbdint.c | 46 userauth_kbdint(Authctxt *authctxt) in userauth_kbdint() argument 58 authenticated = auth2_challenge(authctxt, devs); in userauth_kbdint()
|
D | auth2-passwd.c | 51 userauth_passwd(Authctxt *authctxt) in userauth_passwd() argument 72 else if (PRIVSEP(auth_password(authctxt, password)) == 1) in userauth_passwd()
|
D | auth-rsa.c | 311 auth_rsa(Authctxt *authctxt, BIGNUM *client_n) in auth_rsa() argument 314 struct passwd *pw = authctxt->pw; in auth_rsa() 317 if (!authctxt->valid) in auth_rsa() 343 pubkey_auth_info(authctxt, key, NULL); in auth_rsa()
|
D | sshd.c | 654 privsep_preauth(Authctxt *authctxt) in privsep_preauth() argument 684 monitor_child_preauth(authctxt, pmonitor); in privsep_preauth() 728 privsep_postauth(Authctxt *authctxt) argument 735 if (authctxt->pw->pw_uid == 0 || options.use_login) { 773 do_setusercontext(authctxt->pw); 1464 Authctxt *authctxt; local 2162 authctxt = xcalloc(1, sizeof(*authctxt)); 2164 authctxt->loginmsg = &loginmsg; 2167 the_authctxt = authctxt; 2174 if (privsep_preauth(authctxt) == 1) [all …]
|
/external/openssh/openbsd-compat/ |
D | port-uw.c | 54 sys_auth_passwd(Authctxt *authctxt, const char *password) in sys_auth_passwd() argument 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() 84 if (authctxt->valid) in sys_auth_passwd()
|