|
Lines 310-316
userauth_finish(Authctxt *authctxt, int authenticated, const char *method,
Link Here
|
| 310 |
#endif |
310 |
#endif |
| 311 |
} |
311 |
} |
| 312 |
|
312 |
|
| 313 |
if (authenticated && options.num_auth_methods != 0) { |
313 |
if (authenticated && strcmp(options.auth_methods[0], METHOD_ANY) != 0) { |
| 314 |
if (!auth2_update_methods_lists(authctxt, method, submethod)) { |
314 |
if (!auth2_update_methods_lists(authctxt, method, submethod)) { |
| 315 |
authenticated = 0; |
315 |
authenticated = 0; |
| 316 |
partial = 1; |
316 |
partial = 1; |
|
Lines 392-398
auth2_method_allowed(Authctxt *authctxt, const char *method,
Link Here
|
| 392 |
* NB. authctxt->num_auth_methods might be zero as a result of |
392 |
* NB. authctxt->num_auth_methods might be zero as a result of |
| 393 |
* auth2_setup_methods_lists(), so check the configuration. |
393 |
* auth2_setup_methods_lists(), so check the configuration. |
| 394 |
*/ |
394 |
*/ |
| 395 |
if (options.num_auth_methods == 0) |
395 |
if (strcmp(options.auth_methods[0], METHOD_ANY) == 0) |
| 396 |
return 1; |
396 |
return 1; |
| 397 |
for (i = 0; i < authctxt->num_auth_methods; i++) { |
397 |
for (i = 0; i < authctxt->num_auth_methods; i++) { |
| 398 |
if (list_starts_with(authctxt->auth_methods[i], method, |
398 |
if (list_starts_with(authctxt->auth_methods[i], method, |
|
Lines 507-513
auth2_setup_methods_lists(Authctxt *authctxt)
Link Here
|
| 507 |
{ |
507 |
{ |
| 508 |
u_int i; |
508 |
u_int i; |
| 509 |
|
509 |
|
| 510 |
if (options.num_auth_methods == 0) |
510 |
if (strcmp(options.auth_methods[0], METHOD_ANY) == 0) |
| 511 |
return 0; |
511 |
return 0; |
| 512 |
debug3("%s: checking methods", __func__); |
512 |
debug3("%s: checking methods", __func__); |
| 513 |
authctxt->auth_methods = xcalloc(options.num_auth_methods, |
513 |
authctxt->auth_methods = xcalloc(options.num_auth_methods, |