summaryrefslogtreecommitdiff
path: root/servconf.c
diff options
context:
space:
mode:
authorKees Cook <kees@debian.org>2014-02-09 16:10:06 +0000
committerColin Watson <cjwatson@debian.org>2014-02-09 16:18:49 +0000
commit8a75df792931443e868e574408ed1666208a28c2 (patch)
treeed0e6736ececb28ef92b391d212987cc03f770b0 /servconf.c
parentda3ff9786c4c03b2aac4936b28f06b3c152e230d (diff)
Add DebianBanner server configuration option
Setting this to "no" causes sshd to omit the Debian revision from its initial protocol handshake, for those scared by package-versioning.patch. Bug-Debian: http://bugs.debian.org/562048 Forwarded: not-needed Last-Update: 2013-09-14 Patch-Name: debian-banner.patch
Diffstat (limited to 'servconf.c')
-rw-r--r--servconf.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/servconf.c b/servconf.c
index 9155a8b70..a2928ff57 100644
--- a/servconf.c
+++ b/servconf.c
@@ -157,6 +157,7 @@ initialize_server_options(ServerOptions *options)
157 options->ip_qos_interactive = -1; 157 options->ip_qos_interactive = -1;
158 options->ip_qos_bulk = -1; 158 options->ip_qos_bulk = -1;
159 options->version_addendum = NULL; 159 options->version_addendum = NULL;
160 options->debian_banner = -1;
160} 161}
161 162
162void 163void
@@ -310,6 +311,8 @@ fill_default_server_options(ServerOptions *options)
310 options->ip_qos_bulk = IPTOS_THROUGHPUT; 311 options->ip_qos_bulk = IPTOS_THROUGHPUT;
311 if (options->version_addendum == NULL) 312 if (options->version_addendum == NULL)
312 options->version_addendum = xstrdup(""); 313 options->version_addendum = xstrdup("");
314 if (options->debian_banner == -1)
315 options->debian_banner = 1;
313 /* Turn privilege separation on by default */ 316 /* Turn privilege separation on by default */
314 if (use_privsep == -1) 317 if (use_privsep == -1)
315 use_privsep = PRIVSEP_NOSANDBOX; 318 use_privsep = PRIVSEP_NOSANDBOX;
@@ -360,6 +363,7 @@ typedef enum {
360 sKexAlgorithms, sIPQoS, sVersionAddendum, 363 sKexAlgorithms, sIPQoS, sVersionAddendum,
361 sAuthorizedKeysCommand, sAuthorizedKeysCommandUser, 364 sAuthorizedKeysCommand, sAuthorizedKeysCommandUser,
362 sAuthenticationMethods, sHostKeyAgent, 365 sAuthenticationMethods, sHostKeyAgent,
366 sDebianBanner,
363 sDeprecated, sUnsupported 367 sDeprecated, sUnsupported
364} ServerOpCodes; 368} ServerOpCodes;
365 369
@@ -501,6 +505,7 @@ static struct {
501 { "authorizedkeyscommanduser", sAuthorizedKeysCommandUser, SSHCFG_ALL }, 505 { "authorizedkeyscommanduser", sAuthorizedKeysCommandUser, SSHCFG_ALL },
502 { "versionaddendum", sVersionAddendum, SSHCFG_GLOBAL }, 506 { "versionaddendum", sVersionAddendum, SSHCFG_GLOBAL },
503 { "authenticationmethods", sAuthenticationMethods, SSHCFG_ALL }, 507 { "authenticationmethods", sAuthenticationMethods, SSHCFG_ALL },
508 { "debianbanner", sDebianBanner, SSHCFG_GLOBAL },
504 { NULL, sBadOption, 0 } 509 { NULL, sBadOption, 0 }
505}; 510};
506 511
@@ -1648,6 +1653,10 @@ process_server_config_line(ServerOptions *options, char *line,
1648 } 1653 }
1649 return 0; 1654 return 0;
1650 1655
1656 case sDebianBanner:
1657 intptr = &options->debian_banner;
1658 goto parse_int;
1659
1651 case sDeprecated: 1660 case sDeprecated:
1652 logit("%s line %d: Deprecated option %s", 1661 logit("%s line %d: Deprecated option %s",
1653 filename, linenum, arg); 1662 filename, linenum, arg);