diff options
Diffstat (limited to 'servconf.h')
-rw-r--r-- | servconf.h | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/servconf.h b/servconf.h index a434c6fa3..2ccf4d0f2 100644 --- a/servconf.h +++ b/servconf.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: servconf.h,v 1.99 2011/06/22 21:57:01 djm Exp $ */ | 1 | /* $OpenBSD: servconf.h,v 1.103 2012/07/10 02:19:15 djm Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -39,7 +39,7 @@ | |||
39 | /* use_privsep */ | 39 | /* use_privsep */ |
40 | #define PRIVSEP_OFF 0 | 40 | #define PRIVSEP_OFF 0 |
41 | #define PRIVSEP_ON 1 | 41 | #define PRIVSEP_ON 1 |
42 | #define PRIVSEP_SANDBOX 2 | 42 | #define PRIVSEP_NOSANDBOX 2 |
43 | 43 | ||
44 | #define DEFAULT_AUTH_FAIL_MAX 6 /* Default for MaxAuthTries */ | 44 | #define DEFAULT_AUTH_FAIL_MAX 6 /* Default for MaxAuthTries */ |
45 | #define DEFAULT_SESSIONS_MAX 10 /* Default for MaxSessions */ | 45 | #define DEFAULT_SESSIONS_MAX 10 /* Default for MaxSessions */ |
@@ -169,8 +169,20 @@ typedef struct { | |||
169 | char *revoked_keys_file; | 169 | char *revoked_keys_file; |
170 | char *trusted_user_ca_keys; | 170 | char *trusted_user_ca_keys; |
171 | char *authorized_principals_file; | 171 | char *authorized_principals_file; |
172 | |||
173 | char *version_addendum; /* Appended to SSH banner */ | ||
172 | } ServerOptions; | 174 | } ServerOptions; |
173 | 175 | ||
176 | /* Information about the incoming connection as used by Match */ | ||
177 | struct connection_info { | ||
178 | const char *user; | ||
179 | const char *host; /* possibly resolved hostname */ | ||
180 | const char *address; /* remote address */ | ||
181 | const char *laddress; /* local address */ | ||
182 | int lport; /* local port */ | ||
183 | }; | ||
184 | |||
185 | |||
174 | /* | 186 | /* |
175 | * These are string config options that must be copied between the | 187 | * These are string config options that must be copied between the |
176 | * Match sub-config and the main config, and must be sent from the | 188 | * Match sub-config and the main config, and must be sent from the |
@@ -183,17 +195,24 @@ typedef struct { | |||
183 | M_CP_STROPT(revoked_keys_file); \ | 195 | M_CP_STROPT(revoked_keys_file); \ |
184 | M_CP_STROPT(authorized_principals_file); \ | 196 | M_CP_STROPT(authorized_principals_file); \ |
185 | M_CP_STRARRAYOPT(authorized_keys_files, num_authkeys_files); \ | 197 | M_CP_STRARRAYOPT(authorized_keys_files, num_authkeys_files); \ |
198 | M_CP_STRARRAYOPT(allow_users, num_allow_users); \ | ||
199 | M_CP_STRARRAYOPT(deny_users, num_deny_users); \ | ||
200 | M_CP_STRARRAYOPT(allow_groups, num_allow_groups); \ | ||
201 | M_CP_STRARRAYOPT(deny_groups, num_deny_groups); \ | ||
202 | M_CP_STRARRAYOPT(accept_env, num_accept_env); \ | ||
186 | } while (0) | 203 | } while (0) |
187 | 204 | ||
205 | struct connection_info *get_connection_info(int, int); | ||
188 | void initialize_server_options(ServerOptions *); | 206 | void initialize_server_options(ServerOptions *); |
189 | void fill_default_server_options(ServerOptions *); | 207 | void fill_default_server_options(ServerOptions *); |
190 | int process_server_config_line(ServerOptions *, char *, const char *, int, | 208 | int process_server_config_line(ServerOptions *, char *, const char *, int, |
191 | int *, const char *, const char *, const char *); | 209 | int *, struct connection_info *); |
192 | void load_server_config(const char *, Buffer *); | 210 | void load_server_config(const char *, Buffer *); |
193 | void parse_server_config(ServerOptions *, const char *, Buffer *, | 211 | void parse_server_config(ServerOptions *, const char *, Buffer *, |
194 | const char *, const char *, const char *); | 212 | struct connection_info *); |
195 | void parse_server_match_config(ServerOptions *, const char *, const char *, | 213 | void parse_server_match_config(ServerOptions *, struct connection_info *); |
196 | const char *); | 214 | int parse_server_match_testspec(struct connection_info *, char *); |
215 | int server_match_spec_complete(struct connection_info *); | ||
197 | void copy_set_server_options(ServerOptions *, ServerOptions *, int); | 216 | void copy_set_server_options(ServerOptions *, ServerOptions *, int); |
198 | void dump_config(ServerOptions *); | 217 | void dump_config(ServerOptions *); |
199 | char *derelativise_path(const char *); | 218 | char *derelativise_path(const char *); |