summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--auth2.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/auth2.c b/auth2.c
index e43350c36..16ae1a363 100644
--- a/auth2.c
+++ b/auth2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth2.c,v 1.154 2019/01/19 21:41:18 djm Exp $ */ 1/* $OpenBSD: auth2.c,v 1.155 2019/03/25 22:34:52 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * 4 *
@@ -577,6 +577,14 @@ auth2_setup_methods_lists(Authctxt *authctxt)
577{ 577{
578 u_int i; 578 u_int i;
579 579
580 /* First, normalise away the "any" pseudo-method */
581 if (options.num_auth_methods == 1 &&
582 strcmp(options.auth_methods[0], "any") == 0) {
583 free(options.auth_methods[0]);
584 options.auth_methods[0] = NULL;
585 options.num_auth_methods = 0;
586 }
587
580 if (options.num_auth_methods == 0) 588 if (options.num_auth_methods == 0)
581 return 0; 589 return 0;
582 debug3("%s: checking methods", __func__); 590 debug3("%s: checking methods", __func__);