diff options
Diffstat (limited to 'servconf.h')
-rw-r--r-- | servconf.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/servconf.h b/servconf.h index 5853a9747..1dca702e6 100644 --- a/servconf.h +++ b/servconf.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: servconf.h,v 1.123 2016/11/30 03:00:05 djm Exp $ */ | 1 | /* $OpenBSD: servconf.h,v 1.126 2017/10/02 19:33:20 djm Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -48,12 +48,19 @@ | |||
48 | #define FORWARD_LOCAL (1<<1) | 48 | #define FORWARD_LOCAL (1<<1) |
49 | #define FORWARD_ALLOW (FORWARD_REMOTE|FORWARD_LOCAL) | 49 | #define FORWARD_ALLOW (FORWARD_REMOTE|FORWARD_LOCAL) |
50 | 50 | ||
51 | /* PermitOpen */ | ||
52 | #define PERMITOPEN_ANY 0 | ||
53 | #define PERMITOPEN_NONE -2 | ||
54 | |||
51 | #define DEFAULT_AUTH_FAIL_MAX 6 /* Default for MaxAuthTries */ | 55 | #define DEFAULT_AUTH_FAIL_MAX 6 /* Default for MaxAuthTries */ |
52 | #define DEFAULT_SESSIONS_MAX 10 /* Default for MaxSessions */ | 56 | #define DEFAULT_SESSIONS_MAX 10 /* Default for MaxSessions */ |
53 | 57 | ||
54 | /* Magic name for internal sftp-server */ | 58 | /* Magic name for internal sftp-server */ |
55 | #define INTERNAL_SFTP_NAME "internal-sftp" | 59 | #define INTERNAL_SFTP_NAME "internal-sftp" |
56 | 60 | ||
61 | struct ssh; | ||
62 | struct fwd_perm_list; | ||
63 | |||
57 | typedef struct { | 64 | typedef struct { |
58 | u_int num_ports; | 65 | u_int num_ports; |
59 | u_int ports_from_cmdline; | 66 | u_int ports_from_cmdline; |
@@ -169,7 +176,8 @@ typedef struct { | |||
169 | 176 | ||
170 | int permit_tun; | 177 | int permit_tun; |
171 | 178 | ||
172 | int num_permitted_opens; | 179 | char **permitted_opens; |
180 | u_int num_permitted_opens; /* May also be one of PERMITOPEN_* */ | ||
173 | 181 | ||
174 | char *chroot_directory; | 182 | char *chroot_directory; |
175 | char *revoked_keys_file; | 183 | char *revoked_keys_file; |
@@ -189,6 +197,7 @@ typedef struct { | |||
189 | char *auth_methods[MAX_AUTH_METHODS]; | 197 | char *auth_methods[MAX_AUTH_METHODS]; |
190 | 198 | ||
191 | int fingerprint_hash; | 199 | int fingerprint_hash; |
200 | int expose_userauth_info; | ||
192 | } ServerOptions; | 201 | } ServerOptions; |
193 | 202 | ||
194 | /* Information about the incoming connection as used by Match */ | 203 | /* Information about the incoming connection as used by Match */ |
@@ -228,6 +237,7 @@ struct connection_info { | |||
228 | M_CP_STRARRAYOPT(deny_groups, num_deny_groups); \ | 237 | M_CP_STRARRAYOPT(deny_groups, num_deny_groups); \ |
229 | M_CP_STRARRAYOPT(accept_env, num_accept_env); \ | 238 | M_CP_STRARRAYOPT(accept_env, num_accept_env); \ |
230 | M_CP_STRARRAYOPT(auth_methods, num_auth_methods); \ | 239 | M_CP_STRARRAYOPT(auth_methods, num_auth_methods); \ |
240 | M_CP_STRARRAYOPT_ALLOC(permitted_opens, num_permitted_opens); \ | ||
231 | } while (0) | 241 | } while (0) |
232 | 242 | ||
233 | struct connection_info *get_connection_info(int, int); | 243 | struct connection_info *get_connection_info(int, int); |
@@ -235,6 +245,7 @@ void initialize_server_options(ServerOptions *); | |||
235 | void fill_default_server_options(ServerOptions *); | 245 | void fill_default_server_options(ServerOptions *); |
236 | int process_server_config_line(ServerOptions *, char *, const char *, int, | 246 | int process_server_config_line(ServerOptions *, char *, const char *, int, |
237 | int *, struct connection_info *); | 247 | int *, struct connection_info *); |
248 | void process_permitopen(struct ssh *ssh, ServerOptions *options); | ||
238 | void load_server_config(const char *, Buffer *); | 249 | void load_server_config(const char *, Buffer *); |
239 | void parse_server_config(ServerOptions *, const char *, Buffer *, | 250 | void parse_server_config(ServerOptions *, const char *, Buffer *, |
240 | struct connection_info *); | 251 | struct connection_info *); |