summaryrefslogtreecommitdiff
path: root/servconf.h
diff options
context:
space:
mode:
Diffstat (limited to 'servconf.h')
-rw-r--r--servconf.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/servconf.h b/servconf.h
index a15f2a7fa..bc0536927 100644
--- a/servconf.h
+++ b/servconf.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: servconf.h,v 1.103 2012/07/10 02:19:15 djm Exp $ */ 1/* $OpenBSD: servconf.h,v 1.107 2013/01/03 05:49:36 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -28,6 +28,7 @@
28#define MAX_ACCEPT_ENV 256 /* Max # of env vars. */ 28#define MAX_ACCEPT_ENV 256 /* Max # of env vars. */
29#define MAX_MATCH_GROUPS 256 /* Max # of groups for Match. */ 29#define MAX_MATCH_GROUPS 256 /* Max # of groups for Match. */
30#define MAX_AUTHKEYS_FILES 256 /* Max # of authorized_keys files. */ 30#define MAX_AUTHKEYS_FILES 256 /* Max # of authorized_keys files. */
31#define MAX_AUTH_METHODS 256 /* Max # of AuthenticationMethods. */
31 32
32/* permit_root_login */ 33/* permit_root_login */
33#define PERMIT_NOT_SET -1 34#define PERMIT_NOT_SET -1
@@ -41,6 +42,12 @@
41#define PRIVSEP_ON 1 42#define PRIVSEP_ON 1
42#define PRIVSEP_NOSANDBOX 2 43#define PRIVSEP_NOSANDBOX 2
43 44
45/* AllowTCPForwarding */
46#define FORWARD_DENY 0
47#define FORWARD_REMOTE (1)
48#define FORWARD_LOCAL (1<<1)
49#define FORWARD_ALLOW (FORWARD_REMOTE|FORWARD_LOCAL)
50
44#define DEFAULT_AUTH_FAIL_MAX 6 /* Default for MaxAuthTries */ 51#define DEFAULT_AUTH_FAIL_MAX 6 /* Default for MaxAuthTries */
45#define DEFAULT_SESSIONS_MAX 10 /* Default for MaxSessions */ 52#define DEFAULT_SESSIONS_MAX 10 /* Default for MaxSessions */
46 53
@@ -119,7 +126,7 @@ typedef struct {
119 int permit_user_env; /* If true, read ~/.ssh/environment */ 126 int permit_user_env; /* If true, read ~/.ssh/environment */
120 int use_login; /* If true, login(1) is used */ 127 int use_login; /* If true, login(1) is used */
121 int compression; /* If true, compression is allowed */ 128 int compression; /* If true, compression is allowed */
122 int allow_tcp_forwarding; 129 int allow_tcp_forwarding; /* One of FORWARD_* */
123 int allow_agent_forwarding; 130 int allow_agent_forwarding;
124 u_int num_allow_users; 131 u_int num_allow_users;
125 char *allow_users[MAX_ALLOW_USERS]; 132 char *allow_users[MAX_ALLOW_USERS];
@@ -170,8 +177,14 @@ typedef struct {
170 char *revoked_keys_file; 177 char *revoked_keys_file;
171 char *trusted_user_ca_keys; 178 char *trusted_user_ca_keys;
172 char *authorized_principals_file; 179 char *authorized_principals_file;
180 char *authorized_keys_command;
181 char *authorized_keys_command_user;
173 182
174 char *version_addendum; /* Appended to SSH banner */ 183 char *version_addendum; /* Appended to SSH banner */
184
185 u_int num_auth_methods;
186 char *auth_methods[MAX_AUTH_METHODS];
187
175 int debian_banner; 188 int debian_banner;
176} ServerOptions; 189} ServerOptions;
177 190
@@ -196,12 +209,15 @@ struct connection_info {
196 M_CP_STROPT(trusted_user_ca_keys); \ 209 M_CP_STROPT(trusted_user_ca_keys); \
197 M_CP_STROPT(revoked_keys_file); \ 210 M_CP_STROPT(revoked_keys_file); \
198 M_CP_STROPT(authorized_principals_file); \ 211 M_CP_STROPT(authorized_principals_file); \
212 M_CP_STROPT(authorized_keys_command); \
213 M_CP_STROPT(authorized_keys_command_user); \
199 M_CP_STRARRAYOPT(authorized_keys_files, num_authkeys_files); \ 214 M_CP_STRARRAYOPT(authorized_keys_files, num_authkeys_files); \
200 M_CP_STRARRAYOPT(allow_users, num_allow_users); \ 215 M_CP_STRARRAYOPT(allow_users, num_allow_users); \
201 M_CP_STRARRAYOPT(deny_users, num_deny_users); \ 216 M_CP_STRARRAYOPT(deny_users, num_deny_users); \
202 M_CP_STRARRAYOPT(allow_groups, num_allow_groups); \ 217 M_CP_STRARRAYOPT(allow_groups, num_allow_groups); \
203 M_CP_STRARRAYOPT(deny_groups, num_deny_groups); \ 218 M_CP_STRARRAYOPT(deny_groups, num_deny_groups); \
204 M_CP_STRARRAYOPT(accept_env, num_accept_env); \ 219 M_CP_STRARRAYOPT(accept_env, num_accept_env); \
220 M_CP_STRARRAYOPT(auth_methods, num_auth_methods); \
205 } while (0) 221 } while (0)
206 222
207struct connection_info *get_connection_info(int, int); 223struct connection_info *get_connection_info(int, int);