Home
last modified time | relevance | path

Searched refs:authctxt (Results 1 – 25 of 28) sorted by relevance

12

/external/openssh/
Dauth-krb5.c61 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 …]
Dauth2.c95 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 …]
Dauth1.c118 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 …]
Dauth-bsdauth.c47 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 …]
Dsshconnect2.c281 int (*userauth)(Authctxt *authctxt);
282 void (*cleanup)(Authctxt *authctxt);
303 int userauth_gssapi(Authctxt *authctxt);
362 Authctxt authctxt; in ssh_userauth2() local
390 memset(&authctxt, 0, sizeof(authctxt)); in ssh_userauth2()
391 pubkey_prepare(&authctxt); in ssh_userauth2()
392 authctxt.server_user = server_user; in ssh_userauth2()
393 authctxt.local_user = local_user; in ssh_userauth2()
394 authctxt.host = host; in ssh_userauth2()
395 authctxt.service = "ssh-connection"; /* service name */ in ssh_userauth2()
[all …]
Dauth2-gss.c61 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 …]
Dauth2-chall.c158 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 …]
Dauth-chall.c48 get_challenge(Authctxt *authctxt) in get_challenge() argument
62 if ((authctxt->kbdintctxt = device->init_ctx(authctxt)) == NULL) in get_challenge()
64 if (device->query(authctxt->kbdintctxt, &name, &info, in get_challenge()
66 device->free_ctx(authctxt->kbdintctxt); in get_challenge()
67 authctxt->kbdintctxt = NULL; in get_challenge()
83 verify_response(Authctxt *authctxt, const char *response) in verify_response() argument
91 if (authctxt->kbdintctxt == NULL) in verify_response()
94 switch (device->respond(authctxt->kbdintctxt, 1, resp)) { in verify_response()
99 if ((device->query(authctxt->kbdintctxt, &name, &info, in verify_response()
103 device->respond(authctxt->kbdintctxt, 0, resp) == 0) in verify_response()
[all …]
Dauth-passwd.c82 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 …]
Dauth-skey.c46 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()
Dauth.c257 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 …]
Dmonitor.c169 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 …]
Dauth2-pubkey.c78 userauth_pubkey(Authctxt *authctxt) in userauth_pubkey() argument
88 if (!authctxt->valid) { in userauth_pubkey()
129 if (auth2_userkey_already_used(authctxt, key)) { in userauth_pubkey()
151 xasprintf(&userstyle, "%s%s%s", authctxt->user, in userauth_pubkey()
152 authctxt->style ? ":" : "", in userauth_pubkey()
153 authctxt->style ? authctxt->style : ""); in userauth_pubkey()
159 authctxt->service); in userauth_pubkey()
171 pubkey_auth_info(authctxt, key, NULL); in userauth_pubkey()
175 if (PRIVSEP(user_key_allowed(authctxt->pw, key, 1)) && in userauth_pubkey()
180 auth2_record_userkey(authctxt, key); in userauth_pubkey()
[all …]
Dauth.h94 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 *, ...)
Dauth-sia.c53 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()
Dauth2-hostbased.c59 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()
Dauth-rh-rsa.c69 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()
Dsession.c254 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 …]
Dauth-pam.c621 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 …]
Dauth2-none.c62 userauth_none(Authctxt *authctxt) in userauth_none() argument
70 return (PRIVSEP(auth_password(authctxt, ""))); in userauth_none()
Dauth2-kbdint.c46 userauth_kbdint(Authctxt *authctxt) in userauth_kbdint() argument
58 authenticated = auth2_challenge(authctxt, devs); in userauth_kbdint()
Dauth-rsa.c311 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()
Dauth2-passwd.c51 userauth_passwd(Authctxt *authctxt) in userauth_passwd() argument
72 else if (PRIVSEP(auth_password(authctxt, password)) == 1) in userauth_passwd()
Dsshd.c657 privsep_preauth(Authctxt *authctxt) in privsep_preauth() argument
687 monitor_child_preauth(authctxt, pmonitor); in privsep_preauth()
731 privsep_postauth(Authctxt *authctxt) argument
738 if (authctxt->pw->pw_uid == 0 || options.use_login) {
778 do_setusercontext(authctxt->pw);
1476 Authctxt *authctxt; local
2181 authctxt = xcalloc(1, sizeof(*authctxt));
2183 authctxt->loginmsg = &loginmsg;
2186 the_authctxt = authctxt;
2193 if (privsep_preauth(authctxt) == 1)
[all …]
/external/openssh/openbsd-compat/
Dport-uw.c54 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()

12