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 913a21b39..410c42754 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; |
@@ -171,7 +178,8 @@ typedef struct { | |||
171 | 178 | ||
172 | int permit_tun; | 179 | int permit_tun; |
173 | 180 | ||
174 | int num_permitted_opens; | 181 | char **permitted_opens; |
182 | u_int num_permitted_opens; /* May also be one of PERMITOPEN_* */ | ||
175 | 183 | ||
176 | char *chroot_directory; | 184 | char *chroot_directory; |
177 | char *revoked_keys_file; | 185 | char *revoked_keys_file; |
@@ -191,6 +199,7 @@ typedef struct { | |||
191 | char *auth_methods[MAX_AUTH_METHODS]; | 199 | char *auth_methods[MAX_AUTH_METHODS]; |
192 | 200 | ||
193 | int fingerprint_hash; | 201 | int fingerprint_hash; |
202 | int expose_userauth_info; | ||
194 | 203 | ||
195 | int debian_banner; | 204 | int debian_banner; |
196 | } ServerOptions; | 205 | } ServerOptions; |
@@ -232,6 +241,7 @@ struct connection_info { | |||
232 | M_CP_STRARRAYOPT(deny_groups, num_deny_groups); \ | 241 | M_CP_STRARRAYOPT(deny_groups, num_deny_groups); \ |
233 | M_CP_STRARRAYOPT(accept_env, num_accept_env); \ | 242 | M_CP_STRARRAYOPT(accept_env, num_accept_env); \ |
234 | M_CP_STRARRAYOPT(auth_methods, num_auth_methods); \ | 243 | M_CP_STRARRAYOPT(auth_methods, num_auth_methods); \ |
244 | M_CP_STRARRAYOPT_ALLOC(permitted_opens, num_permitted_opens); \ | ||
235 | } while (0) | 245 | } while (0) |
236 | 246 | ||
237 | struct connection_info *get_connection_info(int, int); | 247 | struct connection_info *get_connection_info(int, int); |
@@ -239,6 +249,7 @@ void initialize_server_options(ServerOptions *); | |||
239 | void fill_default_server_options(ServerOptions *); | 249 | void fill_default_server_options(ServerOptions *); |
240 | int process_server_config_line(ServerOptions *, char *, const char *, int, | 250 | int process_server_config_line(ServerOptions *, char *, const char *, int, |
241 | int *, struct connection_info *); | 251 | int *, struct connection_info *); |
252 | void process_permitopen(struct ssh *ssh, ServerOptions *options); | ||
242 | void load_server_config(const char *, Buffer *); | 253 | void load_server_config(const char *, Buffer *); |
243 | void parse_server_config(ServerOptions *, const char *, Buffer *, | 254 | void parse_server_config(ServerOptions *, const char *, Buffer *, |
244 | struct connection_info *); | 255 | struct connection_info *); |