|
Lines 71-82
void
Link Here
|
| 71 |
initialize_server_options(ServerOptions *options) |
71 |
initialize_server_options(ServerOptions *options) |
| 72 |
{ |
72 |
{ |
| 73 |
memset(options, 0, sizeof(*options)); |
73 |
memset(options, 0, sizeof(*options)); |
| 74 |
|
74 |
|
| 75 |
/* Portable-specific options */ |
75 |
/* Portable-specific options */ |
| 76 |
options->use_pam = -1; |
76 |
options->use_pam = -1; |
|
|
77 |
options->permit_gid_override = -1; |
| 77 |
|
78 |
|
| 78 |
/* Standard Options */ |
79 |
/* Standard Options */ |
| 79 |
options->num_ports = 0; |
80 |
options->num_ports = 0; |
| 80 |
options->ports_from_cmdline = 0; |
81 |
options->ports_from_cmdline = 0; |
| 81 |
options->listen_addrs = NULL; |
82 |
options->listen_addrs = NULL; |
| 82 |
options->address_family = -1; |
83 |
options->address_family = -1; |
|
Lines 177-188
fill_default_server_options(ServerOptions *options)
Link Here
|
| 177 |
{ |
178 |
{ |
| 178 |
int i; |
179 |
int i; |
| 179 |
|
180 |
|
| 180 |
/* Portable-specific options */ |
181 |
/* Portable-specific options */ |
| 181 |
if (options->use_pam == -1) |
182 |
if (options->use_pam == -1) |
| 182 |
options->use_pam = 0; |
183 |
options->use_pam = 0; |
|
|
184 |
if (options->permit_gid_override == -1) |
| 185 |
options->permit_gid_override = 0; |
| 183 |
|
186 |
|
| 184 |
/* Standard Options */ |
187 |
/* Standard Options */ |
| 185 |
if (options->protocol == SSH_PROTO_UNKNOWN) |
188 |
if (options->protocol == SSH_PROTO_UNKNOWN) |
| 186 |
options->protocol = SSH_PROTO_2; |
189 |
options->protocol = SSH_PROTO_2; |
| 187 |
if (options->num_host_key_files == 0) { |
190 |
if (options->num_host_key_files == 0) { |
| 188 |
/* fill default hostkeys for protocols */ |
191 |
/* fill default hostkeys for protocols */ |
|
Lines 367-379
fill_default_server_options(ServerOptions *options)
Link Here
|
| 367 |
} |
370 |
} |
| 368 |
|
371 |
|
| 369 |
/* Keyword tokens. */ |
372 |
/* Keyword tokens. */ |
| 370 |
typedef enum { |
373 |
typedef enum { |
| 371 |
sBadOption, /* == unknown option */ |
374 |
sBadOption, /* == unknown option */ |
| 372 |
/* Portable-specific options */ |
375 |
/* Portable-specific options */ |
| 373 |
sUsePAM, |
376 |
sUsePAM, sPermitGidOverride, |
| 374 |
/* Standard Options */ |
377 |
/* Standard Options */ |
| 375 |
sPort, sHostKeyFile, sServerKeyBits, sLoginGraceTime, |
378 |
sPort, sHostKeyFile, sServerKeyBits, sLoginGraceTime, |
| 376 |
sKeyRegenerationTime, sPermitRootLogin, sLogFacility, sLogLevel, |
379 |
sKeyRegenerationTime, sPermitRootLogin, sLogFacility, sLogLevel, |
| 377 |
sRhostsRSAAuthentication, sRSAAuthentication, |
380 |
sRhostsRSAAuthentication, sRSAAuthentication, |
| 378 |
sKerberosAuthentication, sKerberosOrLocalPasswd, sKerberosTicketCleanup, |
381 |
sKerberosAuthentication, sKerberosOrLocalPasswd, sKerberosTicketCleanup, |
| 379 |
sKerberosGetAFSToken, |
382 |
sKerberosGetAFSToken, |
|
Lines 414-425
static struct {
Link Here
|
| 414 |
ServerOpCodes opcode; |
417 |
ServerOpCodes opcode; |
| 415 |
u_int flags; |
418 |
u_int flags; |
| 416 |
} keywords[] = { |
419 |
} keywords[] = { |
| 417 |
/* Portable-specific options */ |
420 |
/* Portable-specific options */ |
| 418 |
#ifdef USE_PAM |
421 |
#ifdef USE_PAM |
| 419 |
{ "usepam", sUsePAM, SSHCFG_GLOBAL }, |
422 |
{ "usepam", sUsePAM, SSHCFG_GLOBAL }, |
|
|
423 |
{ "permitgidoverride", sPermitGidOverride, SSHCFG_GLOBAL }, |
| 420 |
#else |
424 |
#else |
| 421 |
{ "usepam", sUnsupported, SSHCFG_GLOBAL }, |
425 |
{ "usepam", sUnsupported, SSHCFG_GLOBAL }, |
| 422 |
#endif |
426 |
#endif |
| 423 |
{ "pamauthenticationviakbdint", sDeprecated, SSHCFG_GLOBAL }, |
427 |
{ "pamauthenticationviakbdint", sDeprecated, SSHCFG_GLOBAL }, |
| 424 |
/* Standard Options */ |
428 |
/* Standard Options */ |
| 425 |
{ "port", sPort, SSHCFG_GLOBAL }, |
429 |
{ "port", sPort, SSHCFG_GLOBAL }, |
|
Lines 1227-1238
process_server_config_line(ServerOptions *options, char *line,
Link Here
|
| 1227 |
goto parse_flag; |
1231 |
goto parse_flag; |
| 1228 |
|
1232 |
|
| 1229 |
case sPermitUserEnvironment: |
1233 |
case sPermitUserEnvironment: |
| 1230 |
intptr = &options->permit_user_env; |
1234 |
intptr = &options->permit_user_env; |
| 1231 |
goto parse_flag; |
1235 |
goto parse_flag; |
| 1232 |
|
1236 |
|
|
|
1237 |
case sPermitGidOverride: |
| 1238 |
intptr = &options->permit_gid_override; |
| 1239 |
goto parse_flag; |
| 1240 |
|
| 1233 |
case sUseLogin: |
1241 |
case sUseLogin: |
| 1234 |
intptr = &options->use_login; |
1242 |
intptr = &options->use_login; |
| 1235 |
goto parse_flag; |
1243 |
goto parse_flag; |
| 1236 |
|
1244 |
|
| 1237 |
case sCompression: |
1245 |
case sCompression: |
| 1238 |
intptr = &options->compression; |
1246 |
intptr = &options->compression; |
|
Lines 2092-2103
dump_config(ServerOptions *o)
Link Here
|
| 2092 |
} |
2100 |
} |
| 2093 |
} |
2101 |
} |
| 2094 |
|
2102 |
|
| 2095 |
/* integer arguments */ |
2103 |
/* integer arguments */ |
| 2096 |
#ifdef USE_PAM |
2104 |
#ifdef USE_PAM |
| 2097 |
dump_cfg_int(sUsePAM, o->use_pam); |
2105 |
dump_cfg_int(sUsePAM, o->use_pam); |
|
|
2106 |
dump_cfg_fmtint(sPermitGidOverride, o->permit_gid_override); |
| 2098 |
#endif |
2107 |
#endif |
| 2099 |
dump_cfg_int(sServerKeyBits, o->server_key_bits); |
2108 |
dump_cfg_int(sServerKeyBits, o->server_key_bits); |
| 2100 |
dump_cfg_int(sLoginGraceTime, o->login_grace_time); |
2109 |
dump_cfg_int(sLoginGraceTime, o->login_grace_time); |
| 2101 |
dump_cfg_int(sKeyRegenerationTime, o->key_regeneration_time); |
2110 |
dump_cfg_int(sKeyRegenerationTime, o->key_regeneration_time); |
| 2102 |
dump_cfg_int(sX11DisplayOffset, o->x11_display_offset); |
2111 |
dump_cfg_int(sX11DisplayOffset, o->x11_display_offset); |
| 2103 |
dump_cfg_int(sMaxAuthTries, o->max_authtries); |
2112 |
dump_cfg_int(sMaxAuthTries, o->max_authtries); |