• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/OpenSSH-189/openssh/

Lines Matching defs:authctxt

102 static char *authmethods_get(Authctxt *authctxt);
172 * loop until authctxt->success == TRUE
175 do_authentication2(Authctxt *authctxt)
179 dispatch_run(DISPATCH_BLOCK, &authctxt->success, authctxt);
186 Authctxt *authctxt = ctxt;
192 if (authctxt == NULL)
193 fatal("input_service_request: no authctxt");
196 if (!authctxt->success) {
220 Authctxt *authctxt = ctxt;
225 if (authctxt == NULL)
226 fatal("input_userauth_request: no authctxt");
232 debug("attempt %d failures %d", authctxt->attempt, authctxt->failures);
237 if (authctxt->attempt++ == 0) {
239 authctxt->pw = PRIVSEP(getpwnamallow(user));
240 authctxt->user = xstrdup(user);
241 if (authctxt->pw && strcmp(service, "ssh-connection")==0) {
242 authctxt->valid = 1;
243 debug2("input_userauth_request: setting up authctxt for %s", user);
246 authctxt->pw = fakepw();
253 PRIVSEP(start_pam(authctxt));
255 setproctitle("%s%s", authctxt->valid ? user : "unknown",
257 authctxt->service = xstrdup(service);
258 authctxt->style = style ? xstrdup(style) : NULL;
262 if (auth2_setup_methods_lists(authctxt) != 0)
264 } else if (strcmp(user, authctxt->user) != 0 ||
265 strcmp(service, authctxt->service) != 0) {
268 authctxt->user, authctxt->service, user, service);
271 auth2_challenge_stop(authctxt);
273 auth2_jpake_stop(authctxt);
282 authctxt->postponed = 0;
283 authctxt->server_caused_failure = 0;
286 m = authmethod_lookup(authctxt, method);
287 if (m != NULL && authctxt->failures < options.max_authtries) {
289 authenticated = m->userauth(authctxt);
291 userauth_finish(authctxt, authenticated, method, NULL);
299 userauth_finish(Authctxt *authctxt, int authenticated, const char *method,
305 if (!authctxt->valid && authenticated)
307 authctxt->user);
308 if (authenticated && authctxt->postponed)
312 if (authenticated && authctxt->pw->pw_uid == 0 &&
321 if (!auth2_update_methods_lists(authctxt, method)) {
328 auth_log(authctxt, authenticated, partial, method, submethod, " ssh2");
330 if (authctxt->postponed)
343 "configuration", authctxt->user);
349 if (authenticated && cray_access_denied(authctxt->user)) {
351 fatal("Access denied for user %s.", authctxt->user);
362 authctxt->success = 1;
366 if (!authctxt->server_caused_failure &&
367 (authctxt->attempt > 1 || strcmp(method, "none") != 0))
368 authctxt->failures++;
369 if (authctxt->failures >= options.max_authtries) {
373 packet_disconnect(AUTH_FAIL_MSG, authctxt->user);
375 methods = authmethods_get(authctxt);
393 method_allowed(Authctxt *authctxt, const char *method)
398 * NB. authctxt->num_auth_methods might be zero as a result of
403 for (i = 0; i < authctxt->num_auth_methods; i++) {
404 if (list_starts_with(authctxt->auth_methods[i], method))
411 authmethods_get(Authctxt *authctxt)
424 if (!method_allowed(authctxt, authmethods[i]->name))
438 authmethod_lookup(Authctxt *authctxt, const char *name)
447 method_allowed(authctxt, authmethods[i]->name))
502 * leave authctxt->num_auth_methods == 0, even when multiple required auth
507 auth2_setup_methods_lists(Authctxt *authctxt)
514 authctxt->auth_methods = xcalloc(options.num_auth_methods,
515 sizeof(*authctxt->auth_methods));
516 authctxt->num_auth_methods = 0;
525 authctxt->num_auth_methods, options.auth_methods[i]);
526 authctxt->auth_methods[authctxt->num_auth_methods++] =
529 if (authctxt->num_auth_methods == 0) {
574 auth2_update_methods_lists(Authctxt *authctxt, const char *method)
579 for (i = 0; i < authctxt->num_auth_methods; i++) {
580 if (!remove_method(&(authctxt->auth_methods[i]), method))
583 if (*authctxt->auth_methods[i] == '\0') {
588 i, authctxt->auth_methods[i]);