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 90de88879..37fd2de6d 100644
--- a/servconf.c
+++ b/servconf.c
@@ -156,6 +156,7 @@ initialize_server_options(ServerOptions *options)
156 options->ip_qos_interactive = -1; 156 options->ip_qos_interactive = -1;
157 options->ip_qos_bulk = -1; 157 options->ip_qos_bulk = -1;
158 options->version_addendum = NULL; 158 options->version_addendum = NULL;
159 options->debian_banner = -1;
159} 160}
160 161
161void 162void
@@ -309,6 +310,8 @@ fill_default_server_options(ServerOptions *options)
309 options->ip_qos_bulk = IPTOS_THROUGHPUT; 310 options->ip_qos_bulk = IPTOS_THROUGHPUT;
310 if (options->version_addendum == NULL) 311 if (options->version_addendum == NULL)
311 options->version_addendum = xstrdup(""); 312 options->version_addendum = xstrdup("");
313 if (options->debian_banner == -1)
314 options->debian_banner = 1;
312 /* Turn privilege separation on by default */ 315 /* Turn privilege separation on by default */
313 if (use_privsep == -1) 316 if (use_privsep == -1)
314 use_privsep = PRIVSEP_NOSANDBOX; 317 use_privsep = PRIVSEP_NOSANDBOX;
@@ -359,6 +362,7 @@ typedef enum {
359 sKexAlgorithms, sIPQoS, sVersionAddendum, 362 sKexAlgorithms, sIPQoS, sVersionAddendum,
360 sAuthorizedKeysCommand, sAuthorizedKeysCommandUser, 363 sAuthorizedKeysCommand, sAuthorizedKeysCommandUser,
361 sAuthenticationMethods, sHostKeyAgent, 364 sAuthenticationMethods, sHostKeyAgent,
365 sDebianBanner,
362 sDeprecated, sUnsupported 366 sDeprecated, sUnsupported
363} ServerOpCodes; 367} ServerOpCodes;
364 368
@@ -496,6 +500,7 @@ static struct {
496 { "authorizedkeyscommanduser", sAuthorizedKeysCommandUser, SSHCFG_ALL }, 500 { "authorizedkeyscommanduser", sAuthorizedKeysCommandUser, SSHCFG_ALL },
497 { "versionaddendum", sVersionAddendum, SSHCFG_GLOBAL }, 501 { "versionaddendum", sVersionAddendum, SSHCFG_GLOBAL },
498 { "authenticationmethods", sAuthenticationMethods, SSHCFG_ALL }, 502 { "authenticationmethods", sAuthenticationMethods, SSHCFG_ALL },
503 { "debianbanner", sDebianBanner, SSHCFG_GLOBAL },
499 { NULL, sBadOption, 0 } 504 { NULL, sBadOption, 0 }
500}; 505};
501 506
@@ -1654,6 +1659,10 @@ process_server_config_line(ServerOptions *options, char *line,
1654 } 1659 }
1655 return 0; 1660 return 0;
1656 1661
1662 case sDebianBanner:
1663 intptr = &options->debian_banner;
1664 goto parse_int;
1665
1657 case sDeprecated: 1666 case sDeprecated:
1658 logit("%s line %d: Deprecated option %s", 1667 logit("%s line %d: Deprecated option %s",
1659 filename, linenum, arg); 1668 filename, linenum, arg);
diff --git a/servconf.h b/servconf.h
index c922eb50c..dcd1c2ab8 100644
--- a/servconf.h
+++ b/servconf.h
@@ -186,6 +186,8 @@ typedef struct {
186 186
187 u_int num_auth_methods; 187 u_int num_auth_methods;
188 char *auth_methods[MAX_AUTH_METHODS]; 188 char *auth_methods[MAX_AUTH_METHODS];
189
190 int debian_banner;
189} ServerOptions; 191} ServerOptions;
190 192
191/* Information about the incoming connection as used by Match */ 193/* Information about the incoming connection as used by Match */
diff --git a/sshd.c b/sshd.c
index af9b8f180..665c0b91d 100644
--- a/sshd.c
+++ b/sshd.c
@@ -440,7 +440,8 @@ sshd_exchange_identification(int sock_in, int sock_out)
440 } 440 }
441 441
442 xasprintf(&server_version_string, "SSH-%d.%d-%.100s%s%s%s", 442 xasprintf(&server_version_string, "SSH-%d.%d-%.100s%s%s%s",
443 major, minor, SSH_RELEASE, 443 major, minor,
444 options.debian_banner ? SSH_RELEASE : SSH_RELEASE_MINIMUM,
444 *options.version_addendum == '\0' ? "" : " ", 445 *options.version_addendum == '\0' ? "" : " ",
445 options.version_addendum, newline); 446 options.version_addendum, newline);
446 447
diff --git a/sshd_config.5 b/sshd_config.5
index 2164d5841..8f078f618 100644
--- a/sshd_config.5
+++ b/sshd_config.5
@@ -413,6 +413,11 @@ or
413.Dq no . 413.Dq no .
414The default is 414The default is
415.Dq delayed . 415.Dq delayed .
416.It Cm DebianBanner
417Specifies whether the distribution-specified extra version suffix is
418included during initial protocol handshake.
419The default is
420.Dq yes .
416.It Cm DenyGroups 421.It Cm DenyGroups
417This keyword can be followed by a list of group name patterns, separated 422This keyword can be followed by a list of group name patterns, separated
418by spaces. 423by spaces.