diff options
Diffstat (limited to 'servconf.c')
-rw-r--r-- | servconf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/servconf.c b/servconf.c index a411bfb6e..873b0d02a 100644 --- a/servconf.c +++ b/servconf.c | |||
@@ -1,5 +1,5 @@ | |||
1 | 1 | ||
2 | /* $OpenBSD: servconf.c,v 1.291 2016/06/17 05:03:40 djm Exp $ */ | 2 | /* $OpenBSD: servconf.c,v 1.292 2016/06/23 05:17:51 djm Exp $ */ |
3 | /* | 3 | /* |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
5 | * All rights reserved | 5 | * All rights reserved |
@@ -1813,6 +1813,7 @@ process_server_config_line(ServerOptions *options, char *line, | |||
1813 | case sAuthenticationMethods: | 1813 | case sAuthenticationMethods: |
1814 | if (options->num_auth_methods == 0) { | 1814 | if (options->num_auth_methods == 0) { |
1815 | value = 0; /* seen "any" pseudo-method */ | 1815 | value = 0; /* seen "any" pseudo-method */ |
1816 | value2 = 0; /* sucessfully parsed any method */ | ||
1816 | while ((arg = strdelim(&cp)) && *arg != '\0') { | 1817 | while ((arg = strdelim(&cp)) && *arg != '\0') { |
1817 | if (options->num_auth_methods >= | 1818 | if (options->num_auth_methods >= |
1818 | MAX_AUTH_METHODS) | 1819 | MAX_AUTH_METHODS) |
@@ -1836,12 +1837,13 @@ process_server_config_line(ServerOptions *options, char *line, | |||
1836 | "authentication method list.", | 1837 | "authentication method list.", |
1837 | filename, linenum); | 1838 | filename, linenum); |
1838 | } | 1839 | } |
1840 | value2 = 1; | ||
1839 | if (!*activep) | 1841 | if (!*activep) |
1840 | continue; | 1842 | continue; |
1841 | options->auth_methods[ | 1843 | options->auth_methods[ |
1842 | options->num_auth_methods++] = xstrdup(arg); | 1844 | options->num_auth_methods++] = xstrdup(arg); |
1843 | } | 1845 | } |
1844 | if (options->num_auth_methods == 0) { | 1846 | if (value2 == 0) { |
1845 | fatal("%s line %d: no AuthenticationMethods " | 1847 | fatal("%s line %d: no AuthenticationMethods " |
1846 | "specified", filename, linenum); | 1848 | "specified", filename, linenum); |
1847 | } | 1849 | } |