summaryrefslogtreecommitdiff
path: root/kex.c
diff options
context:
space:
mode:
authorKees Cook <kees@debian.org>2014-02-09 16:10:06 +0000
committerColin Watson <cjwatson@debian.org>2020-06-07 10:25:35 +0100
commit90c1c8771b61dd3ee0eacb4e1cfac404dc42f4b0 (patch)
tree7c28a64bbe2c91e1381e2f36dc96e39c4ba36212 /kex.c
parentd66c30698f807ab95aee7ea4a882c192884df047 (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: 2020-06-07 Patch-Name: debian-banner.patch
Diffstat (limited to 'kex.c')
-rw-r--r--kex.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kex.c b/kex.c
index 0e64bf760..aa5acaac3 100644
--- a/kex.c
+++ b/kex.c
@@ -1225,7 +1225,7 @@ send_error(struct ssh *ssh, char *msg)
1225 */ 1225 */
1226int 1226int
1227kex_exchange_identification(struct ssh *ssh, int timeout_ms, 1227kex_exchange_identification(struct ssh *ssh, int timeout_ms,
1228 const char *version_addendum) 1228 int debian_banner, const char *version_addendum)
1229{ 1229{
1230 int remote_major, remote_minor, mismatch, oerrno = 0; 1230 int remote_major, remote_minor, mismatch, oerrno = 0;
1231 size_t len, i, n; 1231 size_t len, i, n;
@@ -1243,7 +1243,8 @@ kex_exchange_identification(struct ssh *ssh, int timeout_ms,
1243 if (version_addendum != NULL && *version_addendum == '\0') 1243 if (version_addendum != NULL && *version_addendum == '\0')
1244 version_addendum = NULL; 1244 version_addendum = NULL;
1245 if ((r = sshbuf_putf(our_version, "SSH-%d.%d-%.100s%s%s\r\n", 1245 if ((r = sshbuf_putf(our_version, "SSH-%d.%d-%.100s%s%s\r\n",
1246 PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_RELEASE, 1246 PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2,
1247 debian_banner ? SSH_RELEASE : SSH_RELEASE_MINIMUM,
1247 version_addendum == NULL ? "" : " ", 1248 version_addendum == NULL ? "" : " ",
1248 version_addendum == NULL ? "" : version_addendum)) != 0) { 1249 version_addendum == NULL ? "" : version_addendum)) != 0) {
1249 oerrno = errno; 1250 oerrno = errno;