Home
last modified time | relevance | path

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

12

/NextBSD/crypto/openssh/
HDauth-krb5.c60 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 …]
HDauth2.c96 static char *authmethods_get(Authctxt *authctxt);
172 do_authentication2(Authctxt *authctxt) in do_authentication2() argument
176 dispatch_run(DISPATCH_BLOCK, &authctxt->success, authctxt); in do_authentication2()
183 Authctxt *authctxt = ctxt; in input_service_request() local
189 if (authctxt == NULL) in input_service_request()
193 if (!authctxt->success) { in input_service_request()
217 Authctxt *authctxt = ctxt; in input_userauth_request() local
229 if (authctxt == NULL) in input_userauth_request()
236 debug("attempt %d failures %d", authctxt->attempt, authctxt->failures); in input_userauth_request()
241 if (authctxt->attempt++ == 0) { in input_userauth_request()
[all …]
HDauth1.c115 auth1_process_password(Authctxt *authctxt) in auth1_process_password() argument
130 authenticated = PRIVSEP(auth_password(authctxt, password)); in auth1_process_password()
140 auth1_process_rsa(Authctxt *authctxt) in auth1_process_rsa() argument
150 authenticated = auth_rsa(authctxt, n); in auth1_process_rsa()
158 auth1_process_rhosts_rsa(Authctxt *authctxt) in auth1_process_rhosts_rsa() argument
186 authenticated = auth_rhosts_rsa(authctxt, client_user, in auth1_process_rhosts_rsa()
190 auth_info(authctxt, "ruser %.100s", client_user); in auth1_process_rhosts_rsa()
197 auth1_process_tis_challenge(Authctxt *authctxt) in auth1_process_tis_challenge() argument
201 if ((challenge = get_challenge(authctxt)) == NULL) in auth1_process_tis_challenge()
216 auth1_process_tis_response(Authctxt *authctxt) in auth1_process_tis_response() argument
[all …]
HDauth-bsdauth.c45 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
57 if (authctxt->as != NULL) { in bsdauth_query()
59 challenge = auth_getitem(authctxt->as, AUTHV_CHALLENGE); in bsdauth_query()
61 auth_close(authctxt->as); in bsdauth_query()
62 authctxt->as = NULL; in bsdauth_query()
69 authctxt->style ? authctxt->style : "<default>"); in bsdauth_query()
70 authctxt->as = auth_userchallenge(authctxt->user, in bsdauth_query()
71 authctxt->style, "auth-ssh", &challenge); in bsdauth_query()
[all …]
HDsshconnect2.c278 int (*userauth)(Authctxt *authctxt);
279 void (*cleanup)(Authctxt *authctxt);
300 int userauth_gssapi(Authctxt *authctxt);
359 Authctxt authctxt; in ssh_userauth2() local
387 memset(&authctxt, 0, sizeof(authctxt)); in ssh_userauth2()
388 pubkey_prepare(&authctxt); in ssh_userauth2()
389 authctxt.server_user = server_user; in ssh_userauth2()
390 authctxt.local_user = local_user; in ssh_userauth2()
391 authctxt.host = host; in ssh_userauth2()
392 authctxt.service = "ssh-connection"; /* service name */ in ssh_userauth2()
[all …]
HDauth2-gss.c60 userauth_gssapi(Authctxt *authctxt) in userauth_gssapi() argument
70 if (!authctxt->valid || authctxt->user == NULL) in userauth_gssapi()
99 authctxt->server_caused_failure = 1; in userauth_gssapi()
107 authctxt->server_caused_failure = 1; in userauth_gssapi()
111 authctxt->methoddata = (void *)ctxt; in userauth_gssapi()
123 authctxt->postponed = 1; in userauth_gssapi()
131 Authctxt *authctxt = ctxt; in input_gssapi_token() local
138 if (authctxt == NULL || (authctxt->methoddata == NULL && !use_privsep)) in input_gssapi_token()
141 gssctxt = authctxt->methoddata; in input_gssapi_token()
158 authctxt->postponed = 0; in input_gssapi_token()
[all …]
HDauth2-chall.c157 kbdint_next_device(Authctxt *authctxt, KbdintAuthctxt *kbdintctxt) in kbdint_next_device() argument
173 !auth2_method_allowed(authctxt, in kbdint_next_device()
197 auth2_challenge(Authctxt *authctxt, char *devs) in auth2_challenge() argument
200 authctxt->user ? authctxt->user : "<nouser>", in auth2_challenge()
203 if (authctxt->user == NULL || !devs) in auth2_challenge()
205 if (authctxt->kbdintctxt == NULL) in auth2_challenge()
206 authctxt->kbdintctxt = kbdint_alloc(devs); in auth2_challenge()
207 return auth2_challenge_start(authctxt); in auth2_challenge()
212 auth2_challenge_stop(Authctxt *authctxt) in auth2_challenge_stop() argument
216 if (authctxt->kbdintctxt != NULL) { in auth2_challenge_stop()
[all …]
HDauth-chall.c46 get_challenge(Authctxt *authctxt) in get_challenge() argument
60 if ((authctxt->kbdintctxt = device->init_ctx(authctxt)) == NULL) in get_challenge()
62 if (device->query(authctxt->kbdintctxt, &name, &info, in get_challenge()
64 device->free_ctx(authctxt->kbdintctxt); in get_challenge()
65 authctxt->kbdintctxt = NULL; in get_challenge()
81 verify_response(Authctxt *authctxt, const char *response) in verify_response() argument
89 if (authctxt->kbdintctxt == NULL) in verify_response()
92 switch (device->respond(authctxt->kbdintctxt, 1, resp)) { in verify_response()
97 if ((device->query(authctxt->kbdintctxt, &name, &info, in verify_response()
101 device->respond(authctxt->kbdintctxt, 0, resp) == 0) in verify_response()
[all …]
HDauth-passwd.c81 auth_password(Authctxt *authctxt, const char *password) in auth_password() argument
83 struct passwd * pw = authctxt->pw; in auth_password()
84 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()
125 result = sys_auth_passwd(authctxt, password); in auth_password()
126 if (authctxt->force_pwchange) in auth_password()
133 warn_expiry(Authctxt *authctxt, auth_session_t *as) in warn_expiry() argument
[all …]
HDauth-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()
HDauth.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 …]
HDmonitor.c187 static Authctxt *authctxt; variable
352 authctxt = _authctxt; in monitor_child_preauth()
353 memset(authctxt, 0, sizeof(*authctxt)); in monitor_child_preauth()
355 authctxt->loginmsg = &loginmsg; in monitor_child_preauth()
382 !auth2_update_methods_lists(authctxt, in monitor_child_preauth()
395 if (authctxt->pw->pw_uid == 0 && in monitor_child_preauth()
412 auth_log(authctxt, authenticated, partial, in monitor_child_preauth()
415 authctxt->failures++; in monitor_child_preauth()
419 if (!authctxt->valid) in monitor_child_preauth()
425 __func__, authctxt->user); in monitor_child_preauth()
[all …]
HDauth.h88 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);
153 void auth_info(Authctxt *authctxt, const char *, ...)
HDauth2-pubkey.c74 userauth_pubkey(Authctxt *authctxt) in userauth_pubkey() argument
84 if (!authctxt->valid) { in userauth_pubkey()
136 xasprintf(&userstyle, "%s%s%s", authctxt->user, in userauth_pubkey()
137 authctxt->style ? ":" : "", in userauth_pubkey()
138 authctxt->style ? authctxt->style : ""); in userauth_pubkey()
144 authctxt->service); in userauth_pubkey()
156 pubkey_auth_info(authctxt, key, NULL); in userauth_pubkey()
160 if (PRIVSEP(user_key_allowed(authctxt->pw, key)) && in userauth_pubkey()
178 if (PRIVSEP(user_key_allowed(authctxt->pw, key))) { in userauth_pubkey()
184 authctxt->postponed = 1; in userauth_pubkey()
[all …]
HDauth-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()
HDauth2-hostbased.c57 userauth_hostbased(Authctxt *authctxt) in userauth_hostbased() argument
67 if (!authctxt->valid) { in userauth_hostbased()
110 authctxt->service; in userauth_hostbased()
115 buffer_put_cstring(&b, authctxt->user); in userauth_hostbased()
126 pubkey_auth_info(authctxt, key, in userauth_hostbased()
131 if (PRIVSEP(hostbased_key_allowed(authctxt->pw, cuser, chost, key)) && in userauth_hostbased()
HDauth-rh-rsa.c66 auth_rhosts_rsa(Authctxt *authctxt, char *cuser, Key *client_host_key) in auth_rhosts_rsa() argument
69 struct passwd *pw = authctxt->pw; in auth_rhosts_rsa()
74 if (!authctxt->valid || client_host_key == NULL || in auth_rhosts_rsa()
HDsession.c275 do_authenticated(Authctxt *authctxt) in do_authenticated() argument
277 setproctitle("%s", authctxt->pw->pw_name); in do_authenticated()
289 do_authenticated2(authctxt); in do_authenticated()
291 do_authenticated1(authctxt); in do_authenticated()
293 do_cleanup(authctxt); in do_authenticated()
303 do_authenticated1(Authctxt *authctxt) in do_authenticated1() argument
316 s->authctxt = authctxt; in do_authenticated1()
317 s->pw = authctxt->pw; in do_authenticated1()
908 if (options.use_pam && !use_privsep && s->authctxt->force_pwchange) { in do_login()
911 s->authctxt->force_pwchange = 0; in do_login()
[all …]
HDauth-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 …]
HDauth-rsa.c306 auth_rsa(Authctxt *authctxt, BIGNUM *client_n) in auth_rsa() argument
309 struct passwd *pw = authctxt->pw; in auth_rsa()
312 if (!authctxt->valid) in auth_rsa()
338 pubkey_auth_info(authctxt, key, NULL); in auth_rsa()
HDauth2-none.c60 userauth_none(Authctxt *authctxt) in userauth_none() argument
65 return (PRIVSEP(auth_password(authctxt, ""))); in userauth_none()
HDauth2-kbdint.c45 userauth_kbdint(Authctxt *authctxt) in userauth_kbdint() argument
57 authenticated = auth2_challenge(authctxt, devs); in userauth_kbdint()
HDauth2-passwd.c50 userauth_passwd(Authctxt *authctxt) in userauth_passwd() argument
69 else if (PRIVSEP(auth_password(authctxt, password)) == 1) in userauth_passwd()
HDsshd.c669 privsep_preauth(Authctxt *authctxt) in privsep_preauth() argument
693 monitor_child_preauth(authctxt, pmonitor); in privsep_preauth()
737 privsep_postauth(Authctxt *authctxt) argument
744 if (authctxt->pw->pw_uid == 0 || options.use_login) {
780 do_setusercontext(authctxt->pw);
1419 Authctxt *authctxt; local
2141 authctxt = xcalloc(1, sizeof(*authctxt));
2143 authctxt->loginmsg = &loginmsg;
2146 the_authctxt = authctxt;
2153 if (privsep_preauth(authctxt) == 1)
[all …]
/NextBSD/crypto/openssh/openbsd-compat/
HDport-uw.c53 sys_auth_passwd(Authctxt *authctxt, const char *password) in sys_auth_passwd() argument
55 struct passwd *pw = authctxt->pw; in sys_auth_passwd()
60 char *pw_password = authctxt->valid ? shadow_pw(pw) : pw->pw_passwd; in sys_auth_passwd()
83 if (authctxt->valid) in sys_auth_passwd()

12