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-03-20 00:32:29 +0000
commit9fcad888f4dbf0ecc0c7e87b6ef0f8d88d7ac3ec (patch)
tree1ab60157509d36807459667d366a04376038b46d /servconf.c
parent6de70b95f5005447ae23532d4f3ee41a9338479f (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 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);