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 5a058a416..89f38e20f 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
@@ -145,8 +151,8 @@ typedef struct {
145 * disconnect the session 151 * disconnect the session
146 */ 152 */
147 153
148 char *authorized_keys_file; /* File containing public keys */ 154 u_int num_authkeys_files; /* Files containing public keys */
149 char *authorized_keys_file2; 155 char *authorized_keys_files[MAX_AUTHKEYS_FILES];
150 156
151 char *adm_forced_command; 157 char *adm_forced_command;
152 158
@@ -162,6 +168,20 @@ typedef struct {
162 char *authorized_principals_file; 168 char *authorized_principals_file;
163} ServerOptions; 169} ServerOptions;
164 170
171/*
172 * These are string config options that must be copied between the
173 * Match sub-config and the main config, and must be sent from the
174 * privsep slave to the privsep master. We use a macro to ensure all
175 * the options are copied and the copies are done in the correct order.
176 */
177#define COPY_MATCH_STRING_OPTS() do { \
178 M_CP_STROPT(banner); \
179 M_CP_STROPT(trusted_user_ca_keys); \
180 M_CP_STROPT(revoked_keys_file); \
181 M_CP_STROPT(authorized_principals_file); \
182 M_CP_STRARRAYOPT(authorized_keys_files, num_authkeys_files); \
183 } while (0)
184
165void initialize_server_options(ServerOptions *); 185void initialize_server_options(ServerOptions *);
166void fill_default_server_options(ServerOptions *); 186void fill_default_server_options(ServerOptions *);
167int process_server_config_line(ServerOptions *, char *, const char *, int, 187int process_server_config_line(ServerOptions *, char *, const char *, int,