summaryrefslogtreecommitdiff
path: root/servconf.h
diff options
context:
space:
mode:
Diffstat (limited to 'servconf.h')
-rw-r--r--servconf.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/servconf.h b/servconf.h
index 6fc1efb2c..deda09d93 100644
--- a/servconf.h
+++ b/servconf.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: servconf.h,v 1.142 2019/12/15 18:57:30 djm Exp $ */ 1/* $OpenBSD: servconf.h,v 1.143 2020/01/31 22:42:45 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -16,6 +16,8 @@
16#ifndef SERVCONF_H 16#ifndef SERVCONF_H
17#define SERVCONF_H 17#define SERVCONF_H
18 18
19#include <sys/queue.h>
20
19#define MAX_PORTS 256 /* Max # ports. */ 21#define MAX_PORTS 256 /* Max # ports. */
20 22
21#define MAX_SUBSYSTEMS 256 /* Max # subsystems. */ 23#define MAX_SUBSYSTEMS 256 /* Max # subsystems. */
@@ -230,6 +232,15 @@ struct connection_info {
230 * unspecified */ 232 * unspecified */
231}; 233};
232 234
235/* List of included files for re-exec from the parsed configuration */
236struct include_item {
237 char *selector;
238 char *filename;
239 struct sshbuf *contents;
240 TAILQ_ENTRY(include_item) entry;
241};
242TAILQ_HEAD(include_list, include_item);
243
233 244
234/* 245/*
235 * These are string config options that must be copied between the 246 * These are string config options that must be copied between the
@@ -269,12 +280,13 @@ struct connection_info *get_connection_info(struct ssh *, int, int);
269void initialize_server_options(ServerOptions *); 280void initialize_server_options(ServerOptions *);
270void fill_default_server_options(ServerOptions *); 281void fill_default_server_options(ServerOptions *);
271int process_server_config_line(ServerOptions *, char *, const char *, int, 282int process_server_config_line(ServerOptions *, char *, const char *, int,
272 int *, struct connection_info *); 283 int *, struct connection_info *, struct include_list *includes);
273void process_permitopen(struct ssh *ssh, ServerOptions *options); 284void process_permitopen(struct ssh *ssh, ServerOptions *options);
274void load_server_config(const char *, struct sshbuf *); 285void load_server_config(const char *, struct sshbuf *);
275void parse_server_config(ServerOptions *, const char *, struct sshbuf *, 286void parse_server_config(ServerOptions *, const char *, struct sshbuf *,
276 struct connection_info *); 287 struct include_list *includes, struct connection_info *);
277void parse_server_match_config(ServerOptions *, struct connection_info *); 288void parse_server_match_config(ServerOptions *,
289 struct include_list *includes, struct connection_info *);
278int parse_server_match_testspec(struct connection_info *, char *); 290int parse_server_match_testspec(struct connection_info *, char *);
279int server_match_spec_complete(struct connection_info *); 291int server_match_spec_complete(struct connection_info *);
280void copy_set_server_options(ServerOptions *, ServerOptions *, int); 292void copy_set_server_options(ServerOptions *, ServerOptions *, int);