summaryrefslogtreecommitdiff
path: root/servconf.h
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2012-05-19 19:37:01 +1000
committerDarren Tucker <dtucker@zip.com.au>2012-05-19 19:37:01 +1000
commitfbcf827559b38f7992e1bd0bcdc4b4ccdf63bc74 (patch)
treef13d5eac3813d70d50c50196716981b79c606063 /servconf.h
parent593538911a4d27f11f8d56e32abe141223c25916 (diff)
- (dtucker) OpenBSD CVS Sync
- dtucker@cvs.openbsd.org 2012/05/13 01:42:32 [servconf.h servconf.c sshd.8 sshd.c auth.c sshd_config.5] Add "Match LocalAddress" and "Match LocalPort" to sshd and adjust tests to match. Feedback and ok djm@ markus@.
Diffstat (limited to 'servconf.h')
-rw-r--r--servconf.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/servconf.h b/servconf.h
index 66ba387dd..2ffaecdcd 100644
--- a/servconf.h
+++ b/servconf.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: servconf.h,v 1.100 2012/04/12 02:42:32 djm Exp $ */ 1/* $OpenBSD: servconf.h,v 1.101 2012/05/13 01:42:32 dtucker Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -170,6 +170,16 @@ typedef struct {
170 char *version_addendum; /* Appended to SSH banner */ 170 char *version_addendum; /* Appended to SSH banner */
171} ServerOptions; 171} ServerOptions;
172 172
173/* Information about the incoming connection as used by Match */
174struct connection_info {
175 const char *user;
176 const char *host; /* possibly resolved hostname */
177 const char *address; /* remote address */
178 const char *laddress; /* local address */
179 int lport; /* local port */
180};
181
182
173/* 183/*
174 * These are string config options that must be copied between the 184 * These are string config options that must be copied between the
175 * Match sub-config and the main config, and must be sent from the 185 * Match sub-config and the main config, and must be sent from the
@@ -184,15 +194,17 @@ typedef struct {
184 M_CP_STRARRAYOPT(authorized_keys_files, num_authkeys_files); \ 194 M_CP_STRARRAYOPT(authorized_keys_files, num_authkeys_files); \
185 } while (0) 195 } while (0)
186 196
197struct connection_info *get_connection_info(int, int);
187void initialize_server_options(ServerOptions *); 198void initialize_server_options(ServerOptions *);
188void fill_default_server_options(ServerOptions *); 199void fill_default_server_options(ServerOptions *);
189int process_server_config_line(ServerOptions *, char *, const char *, int, 200int process_server_config_line(ServerOptions *, char *, const char *, int,
190 int *, const char *, const char *, const char *); 201 int *, struct connection_info *);
191void load_server_config(const char *, Buffer *); 202void load_server_config(const char *, Buffer *);
192void parse_server_config(ServerOptions *, const char *, Buffer *, 203void parse_server_config(ServerOptions *, const char *, Buffer *,
193 const char *, const char *, const char *); 204 struct connection_info *);
194void parse_server_match_config(ServerOptions *, const char *, const char *, 205void parse_server_match_config(ServerOptions *, struct connection_info *);
195 const char *); 206int parse_server_match_testspec(struct connection_info *, char *);
207int server_match_spec_complete(struct connection_info *);
196void copy_set_server_options(ServerOptions *, ServerOptions *, int); 208void copy_set_server_options(ServerOptions *, ServerOptions *, int);
197void dump_config(ServerOptions *); 209void dump_config(ServerOptions *);
198char *derelativise_path(const char *); 210char *derelativise_path(const char *);