|
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_PAMONLY; |
| 356 |
|
359 |
|
| 357 |
assemble_algorithms(options); |
360 |
assemble_algorithms(options); |
| 358 |
|
361 |
|
|
Lines 430-435
typedef enum {
Link Here
|
| 430 |
sAuthenticationMethods, sHostKeyAgent, sPermitUserRC, |
433 |
sAuthenticationMethods, sHostKeyAgent, sPermitUserRC, |
| 431 |
sStreamLocalBindMask, sStreamLocalBindUnlink, |
434 |
sStreamLocalBindMask, sStreamLocalBindUnlink, |
| 432 |
sAllowStreamLocalForwarding, sFingerprintHash, |
435 |
sAllowStreamLocalForwarding, sFingerprintHash, |
|
|
436 |
sExposeAuthenticationMethods, |
| 433 |
sDeprecated, sUnsupported |
437 |
sDeprecated, sUnsupported |
| 434 |
} ServerOpCodes; |
438 |
} ServerOpCodes; |
| 435 |
|
439 |
|
|
Lines 572-577
static struct {
Link Here
|
| 572 |
{ "streamlocalbindunlink", sStreamLocalBindUnlink, SSHCFG_ALL }, |
576 |
{ "streamlocalbindunlink", sStreamLocalBindUnlink, SSHCFG_ALL }, |
| 573 |
{ "allowstreamlocalforwarding", sAllowStreamLocalForwarding, SSHCFG_ALL }, |
577 |
{ "allowstreamlocalforwarding", sAllowStreamLocalForwarding, SSHCFG_ALL }, |
| 574 |
{ "fingerprinthash", sFingerprintHash, SSHCFG_GLOBAL }, |
578 |
{ "fingerprinthash", sFingerprintHash, SSHCFG_GLOBAL }, |
|
|
579 |
{ "exposeauthenticationmethods", sExposeAuthenticationMethods, SSHCFG_GLOBAL }, |
| 575 |
{ NULL, sBadOption, 0 } |
580 |
{ NULL, sBadOption, 0 } |
| 576 |
}; |
581 |
}; |
| 577 |
|
582 |
|
|
Lines 961-966
static const struct multistate multistate_tcpfwd[] = {
Link Here
|
| 961 |
{ "local", FORWARD_LOCAL }, |
966 |
{ "local", FORWARD_LOCAL }, |
| 962 |
{ NULL, -1 } |
967 |
{ NULL, -1 } |
| 963 |
}; |
968 |
}; |
|
|
969 |
static const struct multistate multistate_exposeauthmeth[] = { |
| 970 |
{ "never", EXPOSE_AUTHMETH_NEVER }, |
| 971 |
{ "pam-only", EXPOSE_AUTHMETH_PAMONLY }, |
| 972 |
{ "pam-and-env", EXPOSE_AUTHMETH_PAMENV }, |
| 973 |
{ NULL, -1} |
| 974 |
}; |
| 964 |
|
975 |
|
| 965 |
int |
976 |
int |
| 966 |
process_server_config_line(ServerOptions *options, char *line, |
977 |
process_server_config_line(ServerOptions *options, char *line, |
|
Lines 1851-1856
process_server_config_line(ServerOptions *options, char *line,
Link Here
|
| 1851 |
options->fingerprint_hash = value; |
1862 |
options->fingerprint_hash = value; |
| 1852 |
break; |
1863 |
break; |
| 1853 |
|
1864 |
|
|
|
1865 |
case sExposeAuthenticationMethods: |
| 1866 |
intptr = &options->expose_auth_methods; |
| 1867 |
multistate_ptr = multistate_exposeauthmeth; |
| 1868 |
goto parse_multistate; |
| 1869 |
|
| 1854 |
case sDeprecated: |
1870 |
case sDeprecated: |
| 1855 |
logit("%s line %d: Deprecated option %s", |
1871 |
logit("%s line %d: Deprecated option %s", |
| 1856 |
filename, linenum, arg); |
1872 |
filename, linenum, arg); |
|
Lines 2005-2010
copy_set_server_options(ServerOptions *dst, ServerOptions *src, int preauth)
Link Here
|
| 2005 |
M_CP_INTOPT(ip_qos_bulk); |
2021 |
M_CP_INTOPT(ip_qos_bulk); |
| 2006 |
M_CP_INTOPT(rekey_limit); |
2022 |
M_CP_INTOPT(rekey_limit); |
| 2007 |
M_CP_INTOPT(rekey_interval); |
2023 |
M_CP_INTOPT(rekey_interval); |
|
|
2024 |
M_CP_INTOPT(expose_auth_methods); |
| 2008 |
|
2025 |
|
| 2009 |
/* M_CP_STROPT and M_CP_STRARRAYOPT should not appear before here */ |
2026 |
/* M_CP_STROPT and M_CP_STRARRAYOPT should not appear before here */ |
| 2010 |
#define M_CP_STROPT(n) do {\ |
2027 |
#define M_CP_STROPT(n) do {\ |
|
Lines 2109-2114
fmt_intarg(ServerOpCodes code, int val)
Link Here
|
| 2109 |
return fmt_multistate_int(val, multistate_tcpfwd); |
2126 |
return fmt_multistate_int(val, multistate_tcpfwd); |
| 2110 |
case sFingerprintHash: |
2127 |
case sFingerprintHash: |
| 2111 |
return ssh_digest_alg_name(val); |
2128 |
return ssh_digest_alg_name(val); |
|
|
2129 |
case sExposeAuthenticationMethods: |
| 2130 |
return fmt_multistate_int(val, multistate_exposeauthmeth); |
| 2112 |
case sProtocol: |
2131 |
case sProtocol: |
| 2113 |
switch (val) { |
2132 |
switch (val) { |
| 2114 |
case SSH_PROTO_1: |
2133 |
case SSH_PROTO_1: |
|
Lines 2295-2300
dump_config(ServerOptions *o)
Link Here
|
| 2295 |
dump_cfg_fmtint(sAllowStreamLocalForwarding, o->allow_streamlocal_forwarding); |
2314 |
dump_cfg_fmtint(sAllowStreamLocalForwarding, o->allow_streamlocal_forwarding); |
| 2296 |
dump_cfg_fmtint(sUsePrivilegeSeparation, use_privsep); |
2315 |
dump_cfg_fmtint(sUsePrivilegeSeparation, use_privsep); |
| 2297 |
dump_cfg_fmtint(sFingerprintHash, o->fingerprint_hash); |
2316 |
dump_cfg_fmtint(sFingerprintHash, o->fingerprint_hash); |
|
|
2317 |
dump_cfg_fmtint(sExposeAuthenticationMethods, o->expose_auth_methods); |
| 2298 |
|
2318 |
|
| 2299 |
/* string arguments */ |
2319 |
/* string arguments */ |
| 2300 |
dump_cfg_string(sPidFile, o->pid_file); |
2320 |
dump_cfg_string(sPidFile, o->pid_file); |