summaryrefslogtreecommitdiff
path: root/servconf.h
diff options
context:
space:
mode:
Diffstat (limited to 'servconf.h')
-rw-r--r--servconf.h25
1 files changed, 21 insertions, 4 deletions
diff --git a/servconf.h b/servconf.h
index d5ad19065..3fa05fcac 100644
--- a/servconf.h
+++ b/servconf.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: servconf.h,v 1.140 2019/04/18 18:56:16 dtucker 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 <openbsd-compat/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. */
@@ -42,6 +44,9 @@
42/* Magic name for internal sftp-server */ 44/* Magic name for internal sftp-server */
43#define INTERNAL_SFTP_NAME "internal-sftp" 45#define INTERNAL_SFTP_NAME "internal-sftp"
44 46
47/* PubkeyAuthOptions flags */
48#define PUBKEYAUTH_TOUCH_REQUIRED 1
49
45struct ssh; 50struct ssh;
46struct fwd_perm_list; 51struct fwd_perm_list;
47 52
@@ -114,6 +119,7 @@ typedef struct {
114 char *ca_sign_algorithms; /* Allowed CA signature algorithms */ 119 char *ca_sign_algorithms; /* Allowed CA signature algorithms */
115 int pubkey_authentication; /* If true, permit ssh2 pubkey authentication. */ 120 int pubkey_authentication; /* If true, permit ssh2 pubkey authentication. */
116 char *pubkey_key_types; /* Key types allowed for public key */ 121 char *pubkey_key_types; /* Key types allowed for public key */
122 int pubkey_auth_options; /* -1 or mask of PUBKEYAUTH_* flags */
117 int kerberos_authentication; /* If true, permit Kerberos 123 int kerberos_authentication; /* If true, permit Kerberos
118 * authentication. */ 124 * authentication. */
119 int kerberos_or_local_passwd; /* If true, permit kerberos 125 int kerberos_or_local_passwd; /* If true, permit kerberos
@@ -214,6 +220,7 @@ typedef struct {
214 int fingerprint_hash; 220 int fingerprint_hash;
215 int expose_userauth_info; 221 int expose_userauth_info;
216 u_int64_t timing_secret; 222 u_int64_t timing_secret;
223 char *sk_provider;
217 224
218 int debian_banner; 225 int debian_banner;
219} ServerOptions; 226} ServerOptions;
@@ -230,6 +237,15 @@ struct connection_info {
230 * unspecified */ 237 * unspecified */
231}; 238};
232 239
240/* List of included files for re-exec from the parsed configuration */
241struct include_item {
242 char *selector;
243 char *filename;
244 struct sshbuf *contents;
245 TAILQ_ENTRY(include_item) entry;
246};
247TAILQ_HEAD(include_list, include_item);
248
233 249
234/* 250/*
235 * These are string config options that must be copied between the 251 * These are string config options that must be copied between the
@@ -269,12 +285,13 @@ struct connection_info *get_connection_info(struct ssh *, int, int);
269void initialize_server_options(ServerOptions *); 285void initialize_server_options(ServerOptions *);
270void fill_default_server_options(ServerOptions *); 286void fill_default_server_options(ServerOptions *);
271int process_server_config_line(ServerOptions *, char *, const char *, int, 287int process_server_config_line(ServerOptions *, char *, const char *, int,
272 int *, struct connection_info *); 288 int *, struct connection_info *, struct include_list *includes);
273void process_permitopen(struct ssh *ssh, ServerOptions *options); 289void process_permitopen(struct ssh *ssh, ServerOptions *options);
274void load_server_config(const char *, struct sshbuf *); 290void load_server_config(const char *, struct sshbuf *);
275void parse_server_config(ServerOptions *, const char *, struct sshbuf *, 291void parse_server_config(ServerOptions *, const char *, struct sshbuf *,
276 struct connection_info *); 292 struct include_list *includes, struct connection_info *);
277void parse_server_match_config(ServerOptions *, struct connection_info *); 293void parse_server_match_config(ServerOptions *,
294 struct include_list *includes, struct connection_info *);
278int parse_server_match_testspec(struct connection_info *, char *); 295int parse_server_match_testspec(struct connection_info *, char *);
279int server_match_spec_complete(struct connection_info *); 296int server_match_spec_complete(struct connection_info *);
280void copy_set_server_options(ServerOptions *, ServerOptions *, int); 297void copy_set_server_options(ServerOptions *, ServerOptions *, int);