summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--servconf.c9
-rw-r--r--servconf.h2
-rw-r--r--sshd.c3
-rw-r--r--sshd_config.55
4 files changed, 18 insertions, 1 deletions
diff --git a/servconf.c b/servconf.c
index 9889fb0a0..b01464059 100644
--- a/servconf.c
+++ b/servconf.c
@@ -167,6 +167,7 @@ initialize_server_options(ServerOptions *options)
167 options->fingerprint_hash = -1; 167 options->fingerprint_hash = -1;
168 options->disable_forwarding = -1; 168 options->disable_forwarding = -1;
169 options->expose_userauth_info = -1; 169 options->expose_userauth_info = -1;
170 options->debian_banner = -1;
170} 171}
171 172
172/* Returns 1 if a string option is unset or set to "none" or 0 otherwise. */ 173/* Returns 1 if a string option is unset or set to "none" or 0 otherwise. */
@@ -342,6 +343,8 @@ fill_default_server_options(ServerOptions *options)
342 options->disable_forwarding = 0; 343 options->disable_forwarding = 0;
343 if (options->expose_userauth_info == -1) 344 if (options->expose_userauth_info == -1)
344 options->expose_userauth_info = 0; 345 options->expose_userauth_info = 0;
346 if (options->debian_banner == -1)
347 options->debian_banner = 1;
345 348
346 assemble_algorithms(options); 349 assemble_algorithms(options);
347 350
@@ -429,6 +432,7 @@ typedef enum {
429 sStreamLocalBindMask, sStreamLocalBindUnlink, 432 sStreamLocalBindMask, sStreamLocalBindUnlink,
430 sAllowStreamLocalForwarding, sFingerprintHash, sDisableForwarding, 433 sAllowStreamLocalForwarding, sFingerprintHash, sDisableForwarding,
431 sExposeAuthInfo, 434 sExposeAuthInfo,
435 sDebianBanner,
432 sDeprecated, sIgnore, sUnsupported 436 sDeprecated, sIgnore, sUnsupported
433} ServerOpCodes; 437} ServerOpCodes;
434 438
@@ -582,6 +586,7 @@ static struct {
582 { "fingerprinthash", sFingerprintHash, SSHCFG_GLOBAL }, 586 { "fingerprinthash", sFingerprintHash, SSHCFG_GLOBAL },
583 { "disableforwarding", sDisableForwarding, SSHCFG_ALL }, 587 { "disableforwarding", sDisableForwarding, SSHCFG_ALL },
584 { "exposeauthinfo", sExposeAuthInfo, SSHCFG_ALL }, 588 { "exposeauthinfo", sExposeAuthInfo, SSHCFG_ALL },
589 { "debianbanner", sDebianBanner, SSHCFG_GLOBAL },
585 { NULL, sBadOption, 0 } 590 { NULL, sBadOption, 0 }
586}; 591};
587 592
@@ -1907,6 +1912,10 @@ process_server_config_line(ServerOptions *options, char *line,
1907 intptr = &options->expose_userauth_info; 1912 intptr = &options->expose_userauth_info;
1908 goto parse_flag; 1913 goto parse_flag;
1909 1914
1915 case sDebianBanner:
1916 intptr = &options->debian_banner;
1917 goto parse_int;
1918
1910 case sDeprecated: 1919 case sDeprecated:
1911 case sIgnore: 1920 case sIgnore:
1912 case sUnsupported: 1921 case sUnsupported:
diff --git a/servconf.h b/servconf.h
index 641e93c8f..410c42754 100644
--- a/servconf.h
+++ b/servconf.h
@@ -200,6 +200,8 @@ typedef struct {
200 200
201 int fingerprint_hash; 201 int fingerprint_hash;
202 int expose_userauth_info; 202 int expose_userauth_info;
203
204 int debian_banner;
203} ServerOptions; 205} ServerOptions;
204 206
205/* Information about the incoming connection as used by Match */ 207/* Information about the incoming connection as used by Match */
diff --git a/sshd.c b/sshd.c
index eccf81bbe..a5a1193df 100644
--- a/sshd.c
+++ b/sshd.c
@@ -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 7db255522..41e8c9399 100644
--- a/sshd_config.5
+++ b/sshd_config.5
@@ -530,6 +530,11 @@ or
530.Cm no . 530.Cm no .
531The default is 531The default is
532.Cm yes . 532.Cm yes .
533.It Cm DebianBanner
534Specifies whether the distribution-specified extra version suffix is
535included during initial protocol handshake.
536The default is
537.Cm yes .
533.It Cm DenyGroups 538.It Cm DenyGroups
534This keyword can be followed by a list of group name patterns, separated 539This keyword can be followed by a list of group name patterns, separated
535by spaces. 540by spaces.