diff options
author | djm@openbsd.org <djm@openbsd.org> | 2020-05-27 21:59:11 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2020-06-07 13:11:55 +0100 |
commit | 877a000e9474ed5e32029f434dbec4de2fb1696f (patch) | |
tree | 82b38d4d404bb2e91405f4baa80dc5eac9b76ead | |
parent | 39b8d128ef980a410bb1ea0ee80e95ac9fff59c3 (diff) |
upstream: Do not call process_queued_listen_addrs() for every
included file from sshd_config; patch from Jakub Jelen
OpenBSD-Commit-ID: 0ff603d6f06a7fab4881f12503b53024799d0a49
Origin: upstream, https://anongit.mindrot.org/openssh.git/commit/?id=0a9a611619b0a1fecd0195ec86a9885f5d681c84
Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=3169
Bug-Debian: https://bugs.debian.org/962035
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1876320
Last-Update: 2020-06-07
Patch-Name: avoid-extra-ports.patch
-rw-r--r-- | servconf.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/servconf.c b/servconf.c index c290e9786..5f3336365 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 |
@@ -75,8 +75,8 @@ static void add_listen_addr(ServerOptions *, const char *, | |||
75 | const char *, int); | 75 | const char *, int); |
76 | static void add_one_listen_addr(ServerOptions *, const char *, | 76 | static void add_one_listen_addr(ServerOptions *, const char *, |
77 | const char *, int); | 77 | const char *, int); |
78 | void parse_server_config_depth(ServerOptions *options, const char *filename, | 78 | static void parse_server_config_depth(ServerOptions *options, |
79 | struct sshbuf *conf, struct include_list *includes, | 79 | const char *filename, struct sshbuf *conf, struct include_list *includes, |
80 | struct connection_info *connectinfo, int flags, int *activep, int depth); | 80 | struct connection_info *connectinfo, int flags, int *activep, int depth); |
81 | 81 | ||
82 | /* Use of privilege separation or not */ | 82 | /* Use of privilege separation or not */ |
@@ -2623,7 +2623,7 @@ copy_set_server_options(ServerOptions *dst, ServerOptions *src, int preauth) | |||
2623 | #undef M_CP_STRARRAYOPT | 2623 | #undef M_CP_STRARRAYOPT |
2624 | 2624 | ||
2625 | #define SERVCONF_MAX_DEPTH 16 | 2625 | #define SERVCONF_MAX_DEPTH 16 |
2626 | void | 2626 | static void |
2627 | parse_server_config_depth(ServerOptions *options, const char *filename, | 2627 | parse_server_config_depth(ServerOptions *options, const char *filename, |
2628 | struct sshbuf *conf, struct include_list *includes, | 2628 | struct sshbuf *conf, struct include_list *includes, |
2629 | struct connection_info *connectinfo, int flags, int *activep, int depth) | 2629 | struct connection_info *connectinfo, int flags, int *activep, int depth) |
@@ -2649,7 +2649,6 @@ parse_server_config_depth(ServerOptions *options, const char *filename, | |||
2649 | if (bad_options > 0) | 2649 | if (bad_options > 0) |
2650 | fatal("%s: terminating, %d bad configuration options", | 2650 | fatal("%s: terminating, %d bad configuration options", |
2651 | filename, bad_options); | 2651 | filename, bad_options); |
2652 | process_queued_listen_addrs(options); | ||
2653 | } | 2652 | } |
2654 | 2653 | ||
2655 | void | 2654 | void |
@@ -2660,6 +2659,7 @@ parse_server_config(ServerOptions *options, const char *filename, | |||
2660 | int active = connectinfo ? 0 : 1; | 2659 | int active = connectinfo ? 0 : 1; |
2661 | parse_server_config_depth(options, filename, conf, includes, | 2660 | parse_server_config_depth(options, filename, conf, includes, |
2662 | connectinfo, 0, &active, 0); | 2661 | connectinfo, 0, &active, 0); |
2662 | process_queued_listen_addrs(options); | ||
2663 | } | 2663 | } |
2664 | 2664 | ||
2665 | static const char * | 2665 | static const char * |