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 23:43:41 +0000
commite1e1e23ca98c59a031217da0ea50b70de5427683 (patch)
treec654229a31850cdb0b2ac46ca1366deca9b410b5 /servconf.c
parent893bd5a6f70b58e1ed98d496c4f465d8c1df71a7 (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 dcb8cafdc..802db1d79 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
@@ -307,6 +308,8 @@ fill_default_server_options(ServerOptions *options)
307 options->ip_qos_bulk = IPTOS_THROUGHPUT; 308 options->ip_qos_bulk = IPTOS_THROUGHPUT;
308 if (options->version_addendum == NULL) 309 if (options->version_addendum == NULL)
309 options->version_addendum = xstrdup(""); 310 options->version_addendum = xstrdup("");
311 if (options->debian_banner == -1)
312 options->debian_banner = 1;
310 /* Turn privilege separation on by default */ 313 /* Turn privilege separation on by default */
311 if (use_privsep == -1) 314 if (use_privsep == -1)
312 use_privsep = PRIVSEP_NOSANDBOX; 315 use_privsep = PRIVSEP_NOSANDBOX;
@@ -357,6 +360,7 @@ typedef enum {
357 sKexAlgorithms, sIPQoS, sVersionAddendum, 360 sKexAlgorithms, sIPQoS, sVersionAddendum,
358 sAuthorizedKeysCommand, sAuthorizedKeysCommandUser, 361 sAuthorizedKeysCommand, sAuthorizedKeysCommandUser,
359 sAuthenticationMethods, sHostKeyAgent, 362 sAuthenticationMethods, sHostKeyAgent,
363 sDebianBanner,
360 sDeprecated, sUnsupported 364 sDeprecated, sUnsupported
361} ServerOpCodes; 365} ServerOpCodes;
362 366
@@ -498,6 +502,7 @@ static struct {
498 { "authorizedkeyscommanduser", sAuthorizedKeysCommandUser, SSHCFG_ALL }, 502 { "authorizedkeyscommanduser", sAuthorizedKeysCommandUser, SSHCFG_ALL },
499 { "versionaddendum", sVersionAddendum, SSHCFG_GLOBAL }, 503 { "versionaddendum", sVersionAddendum, SSHCFG_GLOBAL },
500 { "authenticationmethods", sAuthenticationMethods, SSHCFG_ALL }, 504 { "authenticationmethods", sAuthenticationMethods, SSHCFG_ALL },
505 { "debianbanner", sDebianBanner, SSHCFG_GLOBAL },
501 { NULL, sBadOption, 0 } 506 { NULL, sBadOption, 0 }
502}; 507};
503 508
@@ -1641,6 +1646,10 @@ process_server_config_line(ServerOptions *options, char *line,
1641 } 1646 }
1642 return 0; 1647 return 0;
1643 1648
1649 case sDebianBanner:
1650 intptr = &options->debian_banner;
1651 goto parse_int;
1652
1644 case sDeprecated: 1653 case sDeprecated:
1645 logit("%s line %d: Deprecated option %s", 1654 logit("%s line %d: Deprecated option %s",
1646 filename, linenum, arg); 1655 filename, linenum, arg);