|
Lines 169-174
initialize_server_options(ServerOptions *options)
Link Here
|
| 169 |
options->ip_qos_bulk = -1; |
169 |
options->ip_qos_bulk = -1; |
| 170 |
options->version_addendum = NULL; |
170 |
options->version_addendum = NULL; |
| 171 |
options->fingerprint_hash = -1; |
171 |
options->fingerprint_hash = -1; |
|
|
172 |
options->expose_auth_methods = -1; |
| 172 |
} |
173 |
} |
| 173 |
|
174 |
|
| 174 |
/* Returns 1 if a string option is unset or set to "none" or 0 otherwise. */ |
175 |
/* Returns 1 if a string option is unset or set to "none" or 0 otherwise. */ |
|
Lines 353-358
fill_default_server_options(ServerOptions *options)
Link Here
|
| 353 |
options->fwd_opts.streamlocal_bind_unlink = 0; |
354 |
options->fwd_opts.streamlocal_bind_unlink = 0; |
| 354 |
if (options->fingerprint_hash == -1) |
355 |
if (options->fingerprint_hash == -1) |
| 355 |
options->fingerprint_hash = SSH_FP_HASH_DEFAULT; |
356 |
options->fingerprint_hash = SSH_FP_HASH_DEFAULT; |
|
|
357 |
if (options->expose_auth_methods == -1) |
| 358 |
options->expose_auth_methods = EXPOSE_AUTHMETH_NEVER; |
| 356 |
|
359 |
|
| 357 |
assemble_algorithms(options); |
360 |
assemble_algorithms(options); |
| 358 |
|
361 |
|
|
Lines 438-443
typedef enum {
Link Here
|
| 438 |
sAuthenticationMethods, sHostKeyAgent, sPermitUserRC, |
441 |
sAuthenticationMethods, sHostKeyAgent, sPermitUserRC, |
| 439 |
sStreamLocalBindMask, sStreamLocalBindUnlink, |
442 |
sStreamLocalBindMask, sStreamLocalBindUnlink, |
| 440 |
sAllowStreamLocalForwarding, sFingerprintHash, |
443 |
sAllowStreamLocalForwarding, sFingerprintHash, |
|
|
444 |
sExposeAuthenticationMethods, |
| 441 |
sDeprecated, sUnsupported |
445 |
sDeprecated, sUnsupported |
| 442 |
} ServerOpCodes; |
446 |
} ServerOpCodes; |
| 443 |
|
447 |
|
|
Lines 580-585
static struct {
Link Here
|
| 580 |
{ "streamlocalbindunlink", sStreamLocalBindUnlink, SSHCFG_ALL }, |
584 |
{ "streamlocalbindunlink", sStreamLocalBindUnlink, SSHCFG_ALL }, |
| 581 |
{ "allowstreamlocalforwarding", sAllowStreamLocalForwarding, SSHCFG_ALL }, |
585 |
{ "allowstreamlocalforwarding", sAllowStreamLocalForwarding, SSHCFG_ALL }, |
| 582 |
{ "fingerprinthash", sFingerprintHash, SSHCFG_GLOBAL }, |
586 |
{ "fingerprinthash", sFingerprintHash, SSHCFG_GLOBAL }, |
|
|
587 |
{ "exposeauthenticationmethods", sExposeAuthenticationMethods, SSHCFG_ALL }, |
| 583 |
{ NULL, sBadOption, 0 } |
588 |
{ NULL, sBadOption, 0 } |
| 584 |
}; |
589 |
}; |
| 585 |
|
590 |
|
|
Lines 969-974
static const struct multistate multistate_tcpfwd[] = {
Link Here
|
| 969 |
{ "local", FORWARD_LOCAL }, |
974 |
{ "local", FORWARD_LOCAL }, |
| 970 |
{ NULL, -1 } |
975 |
{ NULL, -1 } |
| 971 |
}; |
976 |
}; |
|
|
977 |
static const struct multistate multistate_exposeauthmeth[] = { |
| 978 |
{ "never", EXPOSE_AUTHMETH_NEVER }, |
| 979 |
{ "pam-only", EXPOSE_AUTHMETH_PAMONLY }, |
| 980 |
{ "pam-and-env", EXPOSE_AUTHMETH_PAMENV }, |
| 981 |
{ NULL, -1} |
| 982 |
}; |
| 972 |
|
983 |
|
| 973 |
int |
984 |
int |
| 974 |
process_server_config_line(ServerOptions *options, char *line, |
985 |
process_server_config_line(ServerOptions *options, char *line, |
|
Lines 1879-1884
process_server_config_line(ServerOptions *options, char *line,
Link Here
|
| 1879 |
options->fingerprint_hash = value; |
1890 |
options->fingerprint_hash = value; |
| 1880 |
break; |
1891 |
break; |
| 1881 |
|
1892 |
|
|
|
1893 |
case sExposeAuthenticationMethods: |
| 1894 |
intptr = &options->expose_auth_methods; |
| 1895 |
multistate_ptr = multistate_exposeauthmeth; |
| 1896 |
goto parse_multistate; |
| 1897 |
|
| 1882 |
case sDeprecated: |
1898 |
case sDeprecated: |
| 1883 |
logit("%s line %d: Deprecated option %s", |
1899 |
logit("%s line %d: Deprecated option %s", |
| 1884 |
filename, linenum, arg); |
1900 |
filename, linenum, arg); |
|
Lines 2034-2039
copy_set_server_options(ServerOptions *dst, ServerOptions *src, int preauth)
Link Here
|
| 2034 |
M_CP_INTOPT(ip_qos_bulk); |
2050 |
M_CP_INTOPT(ip_qos_bulk); |
| 2035 |
M_CP_INTOPT(rekey_limit); |
2051 |
M_CP_INTOPT(rekey_limit); |
| 2036 |
M_CP_INTOPT(rekey_interval); |
2052 |
M_CP_INTOPT(rekey_interval); |
|
|
2053 |
M_CP_INTOPT(expose_auth_methods); |
| 2037 |
|
2054 |
|
| 2038 |
/* |
2055 |
/* |
| 2039 |
* The bind_mask is a mode_t that may be unsigned, so we can't use |
2056 |
* The bind_mask is a mode_t that may be unsigned, so we can't use |
|
Lines 2148-2153
fmt_intarg(ServerOpCodes code, int val)
Link Here
|
| 2148 |
return fmt_multistate_int(val, multistate_tcpfwd); |
2165 |
return fmt_multistate_int(val, multistate_tcpfwd); |
| 2149 |
case sFingerprintHash: |
2166 |
case sFingerprintHash: |
| 2150 |
return ssh_digest_alg_name(val); |
2167 |
return ssh_digest_alg_name(val); |
|
|
2168 |
case sExposeAuthenticationMethods: |
| 2169 |
return fmt_multistate_int(val, multistate_exposeauthmeth); |
| 2151 |
case sProtocol: |
2170 |
case sProtocol: |
| 2152 |
switch (val) { |
2171 |
switch (val) { |
| 2153 |
case SSH_PROTO_1: |
2172 |
case SSH_PROTO_1: |
|
Lines 2337-2342
dump_config(ServerOptions *o)
Link Here
|
| 2337 |
dump_cfg_fmtint(sStreamLocalBindUnlink, o->fwd_opts.streamlocal_bind_unlink); |
2356 |
dump_cfg_fmtint(sStreamLocalBindUnlink, o->fwd_opts.streamlocal_bind_unlink); |
| 2338 |
dump_cfg_fmtint(sUsePrivilegeSeparation, use_privsep); |
2357 |
dump_cfg_fmtint(sUsePrivilegeSeparation, use_privsep); |
| 2339 |
dump_cfg_fmtint(sFingerprintHash, o->fingerprint_hash); |
2358 |
dump_cfg_fmtint(sFingerprintHash, o->fingerprint_hash); |
|
|
2359 |
dump_cfg_fmtint(sExposeAuthenticationMethods, o->expose_auth_methods); |
| 2340 |
|
2360 |
|
| 2341 |
/* string arguments */ |
2361 |
/* string arguments */ |
| 2342 |
dump_cfg_string(sPidFile, o->pid_file); |
2362 |
dump_cfg_string(sPidFile, o->pid_file); |