|
Lines 172-177
Link Here
|
| 172 |
options->version_addendum = NULL; |
172 |
options->version_addendum = NULL; |
| 173 |
options->fingerprint_hash = -1; |
173 |
options->fingerprint_hash = -1; |
| 174 |
options->debian_banner = -1; |
174 |
options->debian_banner = -1; |
|
|
175 |
options->expose_auth_methods = -1; |
| 175 |
} |
176 |
} |
| 176 |
|
177 |
|
| 177 |
/* Returns 1 if a string option is unset or set to "none" or 0 otherwise. */ |
178 |
/* Returns 1 if a string option is unset or set to "none" or 0 otherwise. */ |
|
Lines 399-404
Link Here
|
| 399 |
} |
400 |
} |
| 400 |
#endif |
401 |
#endif |
| 401 |
|
402 |
|
|
|
403 |
if (options->expose_auth_methods == -1) |
| 404 |
options->expose_auth_methods = EXPOSE_AUTHMETH_NEVER; |
| 402 |
} |
405 |
} |
| 403 |
|
406 |
|
| 404 |
/* Keyword tokens. */ |
407 |
/* Keyword tokens. */ |
|
Lines 441-446
Link Here
|
| 441 |
sStreamLocalBindMask, sStreamLocalBindUnlink, |
444 |
sStreamLocalBindMask, sStreamLocalBindUnlink, |
| 442 |
sAllowStreamLocalForwarding, sFingerprintHash, |
445 |
sAllowStreamLocalForwarding, sFingerprintHash, |
| 443 |
sDebianBanner, |
446 |
sDebianBanner, |
|
|
447 |
sExposeAuthenticationMethods, |
| 444 |
sDeprecated, sUnsupported |
448 |
sDeprecated, sUnsupported |
| 445 |
} ServerOpCodes; |
449 |
} ServerOpCodes; |
| 446 |
|
450 |
|
|
Lines 593-598
Link Here
|
| 593 |
{ "allowstreamlocalforwarding", sAllowStreamLocalForwarding, SSHCFG_ALL }, |
597 |
{ "allowstreamlocalforwarding", sAllowStreamLocalForwarding, SSHCFG_ALL }, |
| 594 |
{ "fingerprinthash", sFingerprintHash, SSHCFG_GLOBAL }, |
598 |
{ "fingerprinthash", sFingerprintHash, SSHCFG_GLOBAL }, |
| 595 |
{ "debianbanner", sDebianBanner, SSHCFG_GLOBAL }, |
599 |
{ "debianbanner", sDebianBanner, SSHCFG_GLOBAL }, |
|
|
600 |
{ "exposeauthenticationmethods", sExposeAuthenticationMethods, SSHCFG_ALL }, |
| 596 |
{ NULL, sBadOption, 0 } |
601 |
{ NULL, sBadOption, 0 } |
| 597 |
}; |
602 |
}; |
| 598 |
|
603 |
|
|
Lines 981-986
Link Here
|
| 981 |
{ "local", FORWARD_LOCAL }, |
986 |
{ "local", FORWARD_LOCAL }, |
| 982 |
{ NULL, -1 } |
987 |
{ NULL, -1 } |
| 983 |
}; |
988 |
}; |
|
|
989 |
static const struct multistate multistate_exposeauthmeth[] = { |
| 990 |
{ "never", EXPOSE_AUTHMETH_NEVER }, |
| 991 |
{ "pam-only", EXPOSE_AUTHMETH_PAMONLY }, |
| 992 |
{ "pam-and-env", EXPOSE_AUTHMETH_PAMENV }, |
| 993 |
{ NULL, -1} |
| 994 |
}; |
| 984 |
|
995 |
|
| 985 |
int |
996 |
int |
| 986 |
process_server_config_line(ServerOptions *options, char *line, |
997 |
process_server_config_line(ServerOptions *options, char *line, |
|
Lines 1883-1888
Link Here
|
| 1883 |
intptr = &options->debian_banner; |
1894 |
intptr = &options->debian_banner; |
| 1884 |
goto parse_int; |
1895 |
goto parse_int; |
| 1885 |
|
1896 |
|
|
|
1897 |
case sExposeAuthenticationMethods: |
| 1898 |
intptr = &options->expose_auth_methods; |
| 1899 |
multistate_ptr = multistate_exposeauthmeth; |
| 1900 |
goto parse_multistate; |
| 1901 |
|
| 1886 |
case sDeprecated: |
1902 |
case sDeprecated: |
| 1887 |
logit("%s line %d: Deprecated option %s", |
1903 |
logit("%s line %d: Deprecated option %s", |
| 1888 |
filename, linenum, arg); |
1904 |
filename, linenum, arg); |
|
Lines 2037-2042
Link Here
|
| 2037 |
M_CP_INTOPT(ip_qos_bulk); |
2053 |
M_CP_INTOPT(ip_qos_bulk); |
| 2038 |
M_CP_INTOPT(rekey_limit); |
2054 |
M_CP_INTOPT(rekey_limit); |
| 2039 |
M_CP_INTOPT(rekey_interval); |
2055 |
M_CP_INTOPT(rekey_interval); |
|
|
2056 |
M_CP_INTOPT(expose_auth_methods); |
| 2040 |
|
2057 |
|
| 2041 |
/* M_CP_STROPT and M_CP_STRARRAYOPT should not appear before here */ |
2058 |
/* M_CP_STROPT and M_CP_STRARRAYOPT should not appear before here */ |
| 2042 |
#define M_CP_STROPT(n) do {\ |
2059 |
#define M_CP_STROPT(n) do {\ |
|
Lines 2140-2145
Link Here
|
| 2140 |
return fmt_multistate_int(val, multistate_tcpfwd); |
2157 |
return fmt_multistate_int(val, multistate_tcpfwd); |
| 2141 |
case sFingerprintHash: |
2158 |
case sFingerprintHash: |
| 2142 |
return ssh_digest_alg_name(val); |
2159 |
return ssh_digest_alg_name(val); |
|
|
2160 |
case sExposeAuthenticationMethods: |
| 2161 |
return fmt_multistate_int(val, multistate_exposeauthmeth); |
| 2143 |
case sProtocol: |
2162 |
case sProtocol: |
| 2144 |
switch (val) { |
2163 |
switch (val) { |
| 2145 |
case SSH_PROTO_1: |
2164 |
case SSH_PROTO_1: |
|
Lines 2329-2334
Link Here
|
| 2329 |
dump_cfg_fmtint(sAllowStreamLocalForwarding, o->allow_streamlocal_forwarding); |
2348 |
dump_cfg_fmtint(sAllowStreamLocalForwarding, o->allow_streamlocal_forwarding); |
| 2330 |
dump_cfg_fmtint(sUsePrivilegeSeparation, use_privsep); |
2349 |
dump_cfg_fmtint(sUsePrivilegeSeparation, use_privsep); |
| 2331 |
dump_cfg_fmtint(sFingerprintHash, o->fingerprint_hash); |
2350 |
dump_cfg_fmtint(sFingerprintHash, o->fingerprint_hash); |
|
|
2351 |
dump_cfg_fmtint(sExposeAuthenticationMethods, o->expose_auth_methods); |
| 2332 |
|
2352 |
|
| 2333 |
/* string arguments */ |
2353 |
/* string arguments */ |
| 2334 |
dump_cfg_string(sPidFile, o->pid_file); |
2354 |
dump_cfg_string(sPidFile, o->pid_file); |