Lines Matching full:method

100 #define MATCH_NONE	0	/* method or submethod mismatch */
101 #define MATCH_METHOD 1 /* method matches (no submethod specified) */
102 #define MATCH_BOTH 2 /* method and submethod match */
103 #define MATCH_PARTIAL 3 /* method matches, submethod can't be checked */
274 char *user = NULL, *service = NULL, *method = NULL, *style = NULL; in input_userauth_request() local
283 (r = sshpkt_get_cstring(ssh, &method, NULL)) != 0) in input_userauth_request()
285 debug("userauth-request for user %s service %s method %s", user, service, method); in input_userauth_request()
346 m = authmethod_lookup(authctxt, method); in input_userauth_request()
348 debug2("input_userauth_request: try method %s", method); in input_userauth_request()
349 authenticated = m->userauth(ssh, method); in input_userauth_request()
351 if (!authctxt->authenticated && strcmp(method, "none") != 0) in input_userauth_request()
354 userauth_finish(ssh, authenticated, method, NULL); in input_userauth_request()
359 free(method); in input_userauth_request()
369 const char *method = packet_method; in userauth_finish() local
381 if ((m = authmethod_byname(method)) == NULL) in userauth_finish()
382 fatal("INTERNAL ERROR: bad method %s", method); in userauth_finish()
383 method = m->name; in userauth_finish()
388 !auth_root_allowed(ssh, method)) { in userauth_finish()
396 if (!auth2_update_methods_lists(authctxt, method, submethod)) { in userauth_finish()
403 auth_log(ssh, authenticated, partial, method, submethod); in userauth_finish()
407 auth2_update_session_info(authctxt, method, submethod); in userauth_finish()
448 (authctxt->attempt > 1 || strcmp(method, "none") != 0)) { in userauth_finish()
472 * Checks whether method is allowed by at least one AuthenticationMethods
477 auth2_method_allowed(Authctxt *authctxt, const char *method, in auth2_method_allowed() argument
489 if (list_starts_with(authctxt->auth_methods[i], method, in auth2_method_allowed()
530 fatal_f("NULL authentication method name"); in authmethod_byname()
537 debug_f("unrecognized authentication method name: %s", name); in authmethod_byname()
544 Authmethod *method; in authmethod_lookup() local
546 if ((method = authmethod_byname(name)) == NULL) in authmethod_lookup()
549 if (method->enabled == NULL || *(method->enabled) == 0) { in authmethod_lookup()
550 debug3_f("method %s not enabled", name); in authmethod_lookup()
553 if (!auth2_method_allowed(authctxt, method->name, NULL)) { in authmethod_lookup()
554 debug3_f("method %s not allowed " in authmethod_lookup()
558 return method; in authmethod_lookup()
569 char *methods, *omethods, *method, *p; in auth2_methods_valid() local
574 error("empty authentication method list"); in auth2_methods_valid()
578 while ((method = strsep(&methods, ",")) != NULL) { in auth2_methods_valid()
580 if ((p = strchr(method, ':')) != NULL) in auth2_methods_valid()
582 if (strcmp(method, authmethods[i]->name) != 0) in auth2_methods_valid()
587 error("Disabled method \"%s\" in " in auth2_methods_valid()
589 method, _methods); in auth2_methods_valid()
597 error("Unknown authentication method \"%s\" in list", in auth2_methods_valid()
598 method); in auth2_methods_valid()
620 /* First, normalise away the "any" pseudo-method */ in auth2_setup_methods_lists()
637 "disabled method, skipping", in auth2_setup_methods_lists()
655 list_starts_with(const char *methods, const char *method, in list_starts_with() argument
658 size_t l = strlen(method); in list_starts_with()
662 if (strncmp(methods, method, l) != 0) in list_starts_with()
682 * Remove method from the start of a comma-separated list of methods.
683 * Returns 0 if the list of methods did not start with that method or 1
687 remove_method(char **methods, const char *method, const char *submethod) in remove_method() argument
690 size_t l = strlen(method); in remove_method()
693 match = list_starts_with(omethods, method, submethod); in remove_method()
707 * Called after successful authentication. Will remove the successful method
708 * from the start of each list in which it occurs. If it was the last method
710 * Returns 1 if the method completed any authentication list or 0 otherwise.
713 auth2_update_methods_lists(Authctxt *authctxt, const char *method, in auth2_update_methods_lists() argument
718 debug3_f("updating methods list after \"%s\"", method); in auth2_update_methods_lists()
720 if (!remove_method(&(authctxt->auth_methods[i]), method, in auth2_update_methods_lists()
733 fatal_f("method not in AuthenticationMethods"); in auth2_update_methods_lists()
737 /* Reset method-specific information */
746 /* Record auth method-specific information for logs */
820 * whenever an authentication method succeeds.
823 auth2_update_session_info(Authctxt *authctxt, const char *method, in auth2_update_session_info() argument
833 /* Append method[/submethod] */ in auth2_update_session_info()
835 method, submethod == NULL ? "" : "/", in auth2_update_session_info()
837 fatal_fr(r, "append method"); in auth2_update_session_info()
854 fatal_fr(r, "append method info"); in auth2_update_session_info()