summaryrefslogtreecommitdiff
path: root/servconf.h
diff options
context:
space:
mode:
Diffstat (limited to 'servconf.h')
-rw-r--r--servconf.h26
1 files changed, 23 insertions, 3 deletions
diff --git a/servconf.h b/servconf.h
index 38de13502..a434c6fa3 100644
--- a/servconf.h
+++ b/servconf.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: servconf.h,v 1.95 2010/11/13 23:27:50 djm Exp $ */ 1/* $OpenBSD: servconf.h,v 1.99 2011/06/22 21:57:01 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -27,6 +27,7 @@
27#define MAX_HOSTCERTS 256 /* Max # host certificates. */ 27#define MAX_HOSTCERTS 256 /* Max # host certificates. */
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 31
31/* permit_root_login */ 32/* permit_root_login */
32#define PERMIT_NOT_SET -1 33#define PERMIT_NOT_SET -1
@@ -35,6 +36,11 @@
35#define PERMIT_NO_PASSWD 2 36#define PERMIT_NO_PASSWD 2
36#define PERMIT_YES 3 37#define PERMIT_YES 3
37 38
39/* use_privsep */
40#define PRIVSEP_OFF 0
41#define PRIVSEP_ON 1
42#define PRIVSEP_SANDBOX 2
43
38#define DEFAULT_AUTH_FAIL_MAX 6 /* Default for MaxAuthTries */ 44#define DEFAULT_AUTH_FAIL_MAX 6 /* Default for MaxAuthTries */
39#define DEFAULT_SESSIONS_MAX 10 /* Default for MaxSessions */ 45#define DEFAULT_SESSIONS_MAX 10 /* Default for MaxSessions */
40 46
@@ -148,8 +154,8 @@ typedef struct {
148 * disconnect the session 154 * disconnect the session
149 */ 155 */
150 156
151 char *authorized_keys_file; /* File containing public keys */ 157 u_int num_authkeys_files; /* Files containing public keys */
152 char *authorized_keys_file2; 158 char *authorized_keys_files[MAX_AUTHKEYS_FILES];
153 159
154 char *adm_forced_command; 160 char *adm_forced_command;
155 161
@@ -165,6 +171,20 @@ typedef struct {
165 char *authorized_principals_file; 171 char *authorized_principals_file;
166} ServerOptions; 172} ServerOptions;
167 173
174/*
175 * 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
177 * privsep slave to the privsep master. We use a macro to ensure all
178 * the options are copied and the copies are done in the correct order.
179 */
180#define COPY_MATCH_STRING_OPTS() do { \
181 M_CP_STROPT(banner); \
182 M_CP_STROPT(trusted_user_ca_keys); \
183 M_CP_STROPT(revoked_keys_file); \
184 M_CP_STROPT(authorized_principals_file); \
185 M_CP_STRARRAYOPT(authorized_keys_files, num_authkeys_files); \
186 } while (0)
187
168void initialize_server_options(ServerOptions *); 188void initialize_server_options(ServerOptions *);
169void fill_default_server_options(ServerOptions *); 189void fill_default_server_options(ServerOptions *);
170int process_server_config_line(ServerOptions *, char *, const char *, int, 190int process_server_config_line(ServerOptions *, char *, const char *, int,