diff options
-rw-r--r-- | servconf.c | 9 | ||||
-rw-r--r-- | servconf.h | 2 | ||||
-rw-r--r-- | sshd.c | 3 | ||||
-rw-r--r-- | sshd_config.5 | 5 |
4 files changed, 18 insertions, 1 deletions
diff --git a/servconf.c b/servconf.c index ca73f7c55..a391cf4b2 100644 --- a/servconf.c +++ b/servconf.c | |||
@@ -166,6 +166,7 @@ initialize_server_options(ServerOptions *options) | |||
166 | options->version_addendum = NULL; | 166 | options->version_addendum = NULL; |
167 | options->fingerprint_hash = -1; | 167 | options->fingerprint_hash = -1; |
168 | options->disable_forwarding = -1; | 168 | options->disable_forwarding = -1; |
169 | options->debian_banner = -1; | ||
169 | } | 170 | } |
170 | 171 | ||
171 | /* Returns 1 if a string option is unset or set to "none" or 0 otherwise. */ | 172 | /* Returns 1 if a string option is unset or set to "none" or 0 otherwise. */ |
@@ -339,6 +340,8 @@ fill_default_server_options(ServerOptions *options) | |||
339 | options->fingerprint_hash = SSH_FP_HASH_DEFAULT; | 340 | options->fingerprint_hash = SSH_FP_HASH_DEFAULT; |
340 | if (options->disable_forwarding == -1) | 341 | if (options->disable_forwarding == -1) |
341 | options->disable_forwarding = 0; | 342 | options->disable_forwarding = 0; |
343 | if (options->debian_banner == -1) | ||
344 | options->debian_banner = 1; | ||
342 | 345 | ||
343 | assemble_algorithms(options); | 346 | assemble_algorithms(options); |
344 | 347 | ||
@@ -425,6 +428,7 @@ typedef enum { | |||
425 | sAuthenticationMethods, sHostKeyAgent, sPermitUserRC, | 428 | sAuthenticationMethods, sHostKeyAgent, sPermitUserRC, |
426 | sStreamLocalBindMask, sStreamLocalBindUnlink, | 429 | sStreamLocalBindMask, sStreamLocalBindUnlink, |
427 | sAllowStreamLocalForwarding, sFingerprintHash, sDisableForwarding, | 430 | sAllowStreamLocalForwarding, sFingerprintHash, sDisableForwarding, |
431 | sDebianBanner, | ||
428 | sDeprecated, sIgnore, sUnsupported | 432 | sDeprecated, sIgnore, sUnsupported |
429 | } ServerOpCodes; | 433 | } ServerOpCodes; |
430 | 434 | ||
@@ -577,6 +581,7 @@ static struct { | |||
577 | { "allowstreamlocalforwarding", sAllowStreamLocalForwarding, SSHCFG_ALL }, | 581 | { "allowstreamlocalforwarding", sAllowStreamLocalForwarding, SSHCFG_ALL }, |
578 | { "fingerprinthash", sFingerprintHash, SSHCFG_GLOBAL }, | 582 | { "fingerprinthash", sFingerprintHash, SSHCFG_GLOBAL }, |
579 | { "disableforwarding", sDisableForwarding, SSHCFG_ALL }, | 583 | { "disableforwarding", sDisableForwarding, SSHCFG_ALL }, |
584 | { "debianbanner", sDebianBanner, SSHCFG_GLOBAL }, | ||
580 | { NULL, sBadOption, 0 } | 585 | { NULL, sBadOption, 0 } |
581 | }; | 586 | }; |
582 | 587 | ||
@@ -1866,6 +1871,10 @@ process_server_config_line(ServerOptions *options, char *line, | |||
1866 | options->fingerprint_hash = value; | 1871 | options->fingerprint_hash = value; |
1867 | break; | 1872 | break; |
1868 | 1873 | ||
1874 | case sDebianBanner: | ||
1875 | intptr = &options->debian_banner; | ||
1876 | goto parse_int; | ||
1877 | |||
1869 | case sDeprecated: | 1878 | case sDeprecated: |
1870 | case sIgnore: | 1879 | case sIgnore: |
1871 | case sUnsupported: | 1880 | case sUnsupported: |
diff --git a/servconf.h b/servconf.h index 90dfa4c24..913a21b39 100644 --- a/servconf.h +++ b/servconf.h | |||
@@ -191,6 +191,8 @@ typedef struct { | |||
191 | char *auth_methods[MAX_AUTH_METHODS]; | 191 | char *auth_methods[MAX_AUTH_METHODS]; |
192 | 192 | ||
193 | int fingerprint_hash; | 193 | int fingerprint_hash; |
194 | |||
195 | int debian_banner; | ||
194 | } ServerOptions; | 196 | } ServerOptions; |
195 | 197 | ||
196 | /* Information about the incoming connection as used by Match */ | 198 | /* Information about the incoming connection as used by Match */ |
@@ -378,7 +378,8 @@ sshd_exchange_identification(struct ssh *ssh, int sock_in, int sock_out) | |||
378 | char remote_version[256]; /* Must be at least as big as buf. */ | 378 | char remote_version[256]; /* Must be at least as big as buf. */ |
379 | 379 | ||
380 | xasprintf(&server_version_string, "SSH-%d.%d-%.100s%s%s\r\n", | 380 | xasprintf(&server_version_string, "SSH-%d.%d-%.100s%s%s\r\n", |
381 | PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_RELEASE, | 381 | PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, |
382 | options.debian_banner ? SSH_RELEASE : SSH_RELEASE_MINIMUM, | ||
382 | *options.version_addendum == '\0' ? "" : " ", | 383 | *options.version_addendum == '\0' ? "" : " ", |
383 | options.version_addendum); | 384 | options.version_addendum); |
384 | 385 | ||
diff --git a/sshd_config.5 b/sshd_config.5 index 41ec66887..5f316481a 100644 --- a/sshd_config.5 +++ b/sshd_config.5 | |||
@@ -530,6 +530,11 @@ or | |||
530 | .Cm no . | 530 | .Cm no . |
531 | The default is | 531 | The default is |
532 | .Cm yes . | 532 | .Cm yes . |
533 | .It Cm DebianBanner | ||
534 | Specifies whether the distribution-specified extra version suffix is | ||
535 | included during initial protocol handshake. | ||
536 | The default is | ||
537 | .Cm yes . | ||
533 | .It Cm DenyGroups | 538 | .It Cm DenyGroups |
534 | This keyword can be followed by a list of group name patterns, separated | 539 | This keyword can be followed by a list of group name patterns, separated |
535 | by spaces. | 540 | by spaces. |