/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 | 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() 216 Authctxt *authctxt = ctxt; in input_userauth_request() local 221 if (authctxt == NULL) in input_userauth_request() 228 debug("attempt %d failures %d", authctxt->attempt, authctxt->failures); in input_userauth_request() 233 if (authctxt->attempt++ == 0) { in input_userauth_request() [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 | 284 int (*userauth)(Authctxt *authctxt); 285 void (*cleanup)(Authctxt *authctxt); 308 int userauth_gssapi(Authctxt *authctxt); 369 Authctxt authctxt; in ssh_userauth2() local 378 memset(&authctxt, 0, sizeof(authctxt)); in ssh_userauth2() 379 pubkey_prepare(&authctxt); in ssh_userauth2() 380 authctxt.server_user = server_user; in ssh_userauth2() 381 authctxt.local_user = local_user; in ssh_userauth2() 382 authctxt.host = host; in ssh_userauth2() 383 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 | 158 kbdint_next_device(Authctxt *authctxt, KbdintAuthctxt *kbdintctxt) in kbdint_next_device() argument 174 !auth2_method_allowed(authctxt, in kbdint_next_device() 198 auth2_challenge(Authctxt *authctxt, char *devs) in auth2_challenge() argument 201 authctxt->user ? authctxt->user : "<nouser>", in auth2_challenge() 204 if (authctxt->user == NULL || !devs) in auth2_challenge() 206 if (authctxt->kbdintctxt == NULL) in auth2_challenge() 207 authctxt->kbdintctxt = kbdint_alloc(devs); in auth2_challenge() 208 return auth2_challenge_start(authctxt); in auth2_challenge() 213 auth2_challenge_stop(Authctxt *authctxt) in auth2_challenge_stop() argument 217 if (authctxt->kbdintctxt != NULL) { in auth2_challenge_stop() [all …]
|
D | auth-passwd.c | 84 auth_password(Authctxt *authctxt, const char *password) in auth_password() argument 86 struct passwd * pw = authctxt->pw; in auth_password() 87 int result, ok = authctxt->valid; in auth_password() 104 int ret = auth_krb5_password(authctxt, password); in auth_password() 122 return (sshpam_auth_passwd(authctxt, password) && ok); in auth_password() 127 if (auth_shadow_pwexpired(authctxt)) in auth_password() 128 authctxt->force_pwchange = 1; in auth_password() 131 result = sys_auth_passwd(authctxt, password); in auth_password() 132 if (authctxt->force_pwchange) in auth_password() 139 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 | monitor.c | 169 static Authctxt *authctxt; variable 296 authctxt = _authctxt; in monitor_child_preauth() 297 memset(authctxt, 0, sizeof(*authctxt)); in monitor_child_preauth() 299 authctxt->loginmsg = &loginmsg; in monitor_child_preauth() 316 !auth2_update_methods_lists(authctxt, in monitor_child_preauth() 329 if (authctxt->pw->pw_uid == 0 && in monitor_child_preauth() 346 auth_log(authctxt, authenticated, partial, in monitor_child_preauth() 349 authctxt->failures++; in monitor_child_preauth() 353 if (!authctxt->valid) in monitor_child_preauth() 359 __func__, authctxt->user); in monitor_child_preauth() [all …]
|
D | auth.c | 271 auth_info(Authctxt *authctxt, const char *fmt, ...) in auth_info() argument 276 free(authctxt->info); in auth_info() 277 authctxt->info = NULL; in auth_info() 280 i = vasprintf(&authctxt->info, fmt, ap); in auth_info() 283 if (i < 0 || authctxt->info == NULL) in auth_info() 288 auth_log(Authctxt *authctxt, int authenticated, int partial, in auth_log() argument 295 if (use_privsep && !mm_is_monitor() && !authctxt->postponed) in auth_log() 300 !authctxt->valid || in auth_log() 301 authctxt->failures >= options.max_authtries / 2 || in auth_log() 305 if (authctxt->postponed) in auth_log() [all …]
|
D | auth2-pubkey.c | 78 userauth_pubkey(Authctxt *authctxt) in userauth_pubkey() argument 88 if (!authctxt->valid) { in userauth_pubkey() 130 if (auth2_userkey_already_used(authctxt, key)) { in userauth_pubkey() 154 xasprintf(&userstyle, "%s%s%s", authctxt->user, in userauth_pubkey() 155 authctxt->style ? ":" : "", in userauth_pubkey() 156 authctxt->style ? authctxt->style : ""); in userauth_pubkey() 162 authctxt->service); in userauth_pubkey() 174 pubkey_auth_info(authctxt, key, NULL); in userauth_pubkey() 178 if (PRIVSEP(user_key_allowed(authctxt->pw, key, 1)) && in userauth_pubkey() 183 auth2_record_userkey(authctxt, key); in userauth_pubkey() [all …]
|
D | auth.h | 94 int (*userauth)(Authctxt *authctxt); 132 int auth_krb5(Authctxt *authctxt, krb5_data *auth, char **client, krb5_data *); 133 int auth_krb5_tgt(Authctxt *authctxt, krb5_data *tgt); 134 int auth_krb5_password(Authctxt *authctxt, const char *password); 135 void krb5_cleanup_proc(Authctxt *authctxt); 152 void auth_info(Authctxt *authctxt, const char *, ...)
|
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 | auth2-hostbased.c | 59 userauth_hostbased(Authctxt *authctxt) in userauth_hostbased() argument 69 if (!authctxt->valid) { in userauth_hostbased() 119 authctxt->service; in userauth_hostbased() 124 buffer_put_cstring(&b, authctxt->user); in userauth_hostbased() 135 pubkey_auth_info(authctxt, key, in userauth_hostbased() 140 if (PRIVSEP(hostbased_key_allowed(authctxt->pw, cuser, chost, key)) && in userauth_hostbased()
|
D | auth-pam.c | 621 sshpam_init(Authctxt *authctxt) in sshpam_init() argument 623 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() 917 start_pam(Authctxt *authctxt) in start_pam() argument 922 if (sshpam_init(authctxt) == -1) in start_pam() 1200 sshpam_auth_passwd(Authctxt *authctxt, const char *password) in sshpam_auth_passwd() argument 1211 sshpam_authctxt = authctxt; in sshpam_auth_passwd() 1218 if (!authctxt->valid || (authctxt->pw->pw_uid == 0 && in sshpam_auth_passwd() [all …]
|
D | session.c | 254 do_authenticated(Authctxt *authctxt) in do_authenticated() argument 256 setproctitle("%s", authctxt->pw->pw_name); in do_authenticated() 268 do_authenticated2(authctxt); in do_authenticated() 269 do_cleanup(authctxt); in do_authenticated() 729 if (options.use_pam && !use_privsep && s->authctxt->force_pwchange) { in do_login() 732 s->authctxt->force_pwchange = 0; in do_login() 1127 if (s->authctxt->krb5_ccname) in do_setup_env() 1129 s->authctxt->krb5_ccname); in do_setup_env() 1504 if (s->authctxt->force_pwchange) { in do_child() 1586 (s->authctxt->krb5_ctx != NULL)) { in do_child() [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 | sshd.c | 579 privsep_preauth(Authctxt *authctxt) in privsep_preauth() argument 609 monitor_child_preauth(authctxt, pmonitor); in privsep_preauth() 648 privsep_postauth(Authctxt *authctxt) argument 653 if (authctxt->pw->pw_uid == 0) { 686 do_setusercontext(authctxt->pw); 1424 Authctxt *authctxt; local 2071 authctxt = xcalloc(1, sizeof(*authctxt)); 2073 authctxt->loginmsg = &loginmsg; 2076 the_authctxt = authctxt; 2083 if (privsep_preauth(authctxt) == 1) [all …]
|
D | session.h | 36 Authctxt *authctxt; member
|
D | monitor_wrap.c | 350 mm_auth_password(Authctxt *authctxt, char *password) in mm_auth_password() argument 558 mm_start_pam(Authctxt *authctxt) in mm_start_pam() argument 601 mm_sshpam_init_ctx(Authctxt *authctxt) in mm_sshpam_init_ctx() argument 618 return (authctxt); in mm_sshpam_init_ctx()
|
D | serverloop.c | 352 server_loop2(Authctxt *authctxt) in server_loop2() argument
|
D | ChangeLog | 969 don't dereference authctxt before testing != NULL, it
|
/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()
|