diff options
author | djm@openbsd.org <djm@openbsd.org> | 2020-05-27 21:59:11 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2020-05-28 10:25:18 +1000 |
commit | 0a9a611619b0a1fecd0195ec86a9885f5d681c84 (patch) | |
tree | dc1f2ae4ee5d131bf1928c92956bbe4b4b7fb36f | |
parent | 16ea1fdbe736648f79a827219134331f8d9844fb (diff) |
upstream: Do not call process_queued_listen_addrs() for every
included file from sshd_config; patch from Jakub Jelen
OpenBSD-Commit-ID: 0ff603d6f06a7fab4881f12503b53024799d0a49
-rw-r--r-- | servconf.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/servconf.c b/servconf.c index ba0a92c7b..391f4e827 100644 --- a/servconf.c +++ b/servconf.c | |||
@@ -1,5 +1,5 @@ | |||
1 | 1 | ||
2 | /* $OpenBSD: servconf.c,v 1.363 2020/04/17 03:30:05 djm Exp $ */ | 2 | /* $OpenBSD: servconf.c,v 1.364 2020/05/27 21:59:11 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 |
@@ -74,8 +74,8 @@ static void add_listen_addr(ServerOptions *, const char *, | |||
74 | const char *, int); | 74 | const char *, int); |
75 | static void add_one_listen_addr(ServerOptions *, const char *, | 75 | static void add_one_listen_addr(ServerOptions *, const char *, |
76 | const char *, int); | 76 | const char *, int); |
77 | void parse_server_config_depth(ServerOptions *options, const char *filename, | 77 | static void parse_server_config_depth(ServerOptions *options, |
78 | struct sshbuf *conf, struct include_list *includes, | 78 | const char *filename, struct sshbuf *conf, struct include_list *includes, |
79 | struct connection_info *connectinfo, int flags, int *activep, int depth); | 79 | struct connection_info *connectinfo, int flags, int *activep, int depth); |
80 | 80 | ||
81 | /* Use of privilege separation or not */ | 81 | /* Use of privilege separation or not */ |
@@ -2570,7 +2570,7 @@ copy_set_server_options(ServerOptions *dst, ServerOptions *src, int preauth) | |||
2570 | #undef M_CP_STRARRAYOPT | 2570 | #undef M_CP_STRARRAYOPT |
2571 | 2571 | ||
2572 | #define SERVCONF_MAX_DEPTH 16 | 2572 | #define SERVCONF_MAX_DEPTH 16 |
2573 | void | 2573 | static void |
2574 | parse_server_config_depth(ServerOptions *options, const char *filename, | 2574 | parse_server_config_depth(ServerOptions *options, const char *filename, |
2575 | struct sshbuf *conf, struct include_list *includes, | 2575 | struct sshbuf *conf, struct include_list *includes, |
2576 | struct connection_info *connectinfo, int flags, int *activep, int depth) | 2576 | struct connection_info *connectinfo, int flags, int *activep, int depth) |
@@ -2596,7 +2596,6 @@ parse_server_config_depth(ServerOptions *options, const char *filename, | |||
2596 | if (bad_options > 0) | 2596 | if (bad_options > 0) |
2597 | fatal("%s: terminating, %d bad configuration options", | 2597 | fatal("%s: terminating, %d bad configuration options", |
2598 | filename, bad_options); | 2598 | filename, bad_options); |
2599 | process_queued_listen_addrs(options); | ||
2600 | } | 2599 | } |
2601 | 2600 | ||
2602 | void | 2601 | void |
@@ -2607,6 +2606,7 @@ parse_server_config(ServerOptions *options, const char *filename, | |||
2607 | int active = connectinfo ? 0 : 1; | 2606 | int active = connectinfo ? 0 : 1; |
2608 | parse_server_config_depth(options, filename, conf, includes, | 2607 | parse_server_config_depth(options, filename, conf, includes, |
2609 | connectinfo, 0, &active, 0); | 2608 | connectinfo, 0, &active, 0); |
2609 | process_queued_listen_addrs(options); | ||
2610 | } | 2610 | } |
2611 | 2611 | ||
2612 | static const char * | 2612 | static const char * |