Lines Matching refs:method
97 #define MATCH_NONE 0 /* method or submethod mismatch */
98 #define MATCH_METHOD 1 /* method matches (no submethod specified) */
99 #define MATCH_BOTH 2 /* method and submethod match */
100 #define MATCH_PARTIAL 3 /* method matches, submethod can't be checked */
217 char *user, *service, *method, *style = NULL;
225 method = packet_get_cstring(NULL);
226 debug("userauth-request for user %s service %s method %s", user, service, method);
278 m = authmethod_lookup(authctxt, method);
280 debug2("input_userauth_request: try method %s", method);
283 userauth_finish(authctxt, authenticated, method, NULL);
287 free(method);
292 userauth_finish(Authctxt *authctxt, int authenticated, const char *method,
306 !auth_root_allowed(method)) {
314 if (!auth2_update_methods_lists(authctxt, method, submethod)) {
321 auth_log(authctxt, authenticated, partial, method, submethod);
360 (authctxt->attempt > 1 || strcmp(method, "none") != 0))
381 * Checks whether method is allowed by at least one AuthenticationMethods
386 auth2_method_allowed(Authctxt *authctxt, const char *method,
398 if (list_starts_with(authctxt->auth_methods[i], method,
446 debug2("Unrecognized authentication method name: %s",
459 char *methods, *omethods, *method, *p;
464 error("empty authentication method list");
468 while ((method = strsep(&methods, ",")) != NULL) {
470 if ((p = strchr(method, ':')) != NULL)
472 if (strcmp(method, authmethods[i]->name) != 0)
477 error("Disabled method \"%s\" in "
479 method, _methods);
487 error("Unknown authentication method \"%s\" in list",
488 method);
519 "disabled method, skipping",
537 list_starts_with(const char *methods, const char *method,
540 size_t l = strlen(method);
544 if (strncmp(methods, method, l) != 0)
564 * Remove method from the start of a comma-separated list of methods.
565 * Returns 0 if the list of methods did not start with that method or 1
569 remove_method(char **methods, const char *method, const char *submethod)
572 size_t l = strlen(method);
575 match = list_starts_with(omethods, method, submethod);
589 * Called after successful authentication. Will remove the successful method
590 * from the start of each list in which it occurs. If it was the last method
592 * Returns 1 if the method completed any authentication list or 0 otherwise.
595 auth2_update_methods_lists(Authctxt *authctxt, const char *method,
600 debug3("%s: updating methods list after \"%s\"", __func__, method);
602 if (!remove_method(&(authctxt->auth_methods[i]), method,
615 fatal("%s: method not in AuthenticationMethods", __func__);