From 730e12063b532f59292af38f584d84127a77ebdd Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Sat, 16 Jan 2010 00:07:00 +0000 Subject: Implement DebianBanner server configuration flag that can be set to "no" to allow sshd to run without the Debian-specific extra version in the initial protocol handshake (closes: #562048). --- servconf.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'servconf.c') diff --git a/servconf.c b/servconf.c index c1f2bc2af..dd5161ecd 100644 --- a/servconf.c +++ b/servconf.c @@ -132,6 +132,7 @@ initialize_server_options(ServerOptions *options) options->adm_forced_command = NULL; options->chroot_directory = NULL; options->zero_knowledge_password_authentication = -1; + options->debian_banner = -1; } void @@ -273,6 +274,8 @@ fill_default_server_options(ServerOptions *options) options->permit_tun = SSH_TUNMODE_NO; if (options->zero_knowledge_password_authentication == -1) options->zero_knowledge_password_authentication = 0; + if (options->debian_banner == -1) + options->debian_banner = 1; /* Turn privilege separation on by default */ if (use_privsep == -1) @@ -320,6 +323,7 @@ typedef enum { sMatch, sPermitOpen, sForceCommand, sChrootDirectory, sUsePrivilegeSeparation, sAllowAgentForwarding, sZeroKnowledgePasswordAuthentication, + sDebianBanner, sDeprecated, sUnsupported } ServerOpCodes; @@ -449,6 +453,7 @@ static struct { { "permitopen", sPermitOpen, SSHCFG_ALL }, { "forcecommand", sForceCommand, SSHCFG_ALL }, { "chrootdirectory", sChrootDirectory, SSHCFG_ALL }, + { "debianbanner", sDebianBanner, SSHCFG_GLOBAL }, { NULL, sBadOption, 0 } }; @@ -1335,6 +1340,10 @@ process_server_config_line(ServerOptions *options, char *line, *charptr = xstrdup(arg); break; + case sDebianBanner: + intptr = &options->debian_banner; + goto parse_int; + case sDeprecated: logit("%s line %d: Deprecated option %s", filename, linenum, arg); -- cgit v1.2.3