summaryrefslogtreecommitdiff
path: root/debian/patches/package-versioning.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/package-versioning.patch')
-rw-r--r--debian/patches/package-versioning.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/debian/patches/package-versioning.patch b/debian/patches/package-versioning.patch
new file mode 100644
index 000000000..a560ae940
--- /dev/null
+++ b/debian/patches/package-versioning.patch
@@ -0,0 +1,47 @@
1From d66c30698f807ab95aee7ea4a882c192884df047 Mon Sep 17 00:00:00 2001
2From: Matthew Vernon <matthew@debian.org>
3Date: Sun, 9 Feb 2014 16:10:05 +0000
4Subject: Include the Debian version in our identification
5
6This makes it easier to audit networks for versions patched against security
7vulnerabilities. It has little detrimental effect, as attackers will
8generally just try attacks rather than bothering to scan for
9vulnerable-looking version strings. (However, see debian-banner.patch.)
10
11Forwarded: not-needed
12Last-Update: 2019-06-05
13
14Patch-Name: package-versioning.patch
15---
16 kex.c | 2 +-
17 version.h | 7 ++++++-
18 2 files changed, 7 insertions(+), 2 deletions(-)
19
20diff --git a/kex.c b/kex.c
21index 144dee512..0e64bf760 100644
22--- a/kex.c
23+++ b/kex.c
24@@ -1243,7 +1243,7 @@ kex_exchange_identification(struct ssh *ssh, int timeout_ms,
25 if (version_addendum != NULL && *version_addendum == '\0')
26 version_addendum = NULL;
27 if ((r = sshbuf_putf(our_version, "SSH-%d.%d-%.100s%s%s\r\n",
28- PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_VERSION,
29+ PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_RELEASE,
30 version_addendum == NULL ? "" : " ",
31 version_addendum == NULL ? "" : version_addendum)) != 0) {
32 oerrno = errno;
33diff --git a/version.h b/version.h
34index a2eca3ec8..158eaee70 100644
35--- a/version.h
36+++ b/version.h
37@@ -3,4 +3,9 @@
38 #define SSH_VERSION "OpenSSH_8.3"
39
40 #define SSH_PORTABLE "p1"
41-#define SSH_RELEASE SSH_VERSION SSH_PORTABLE
42+#define SSH_RELEASE_MINIMUM SSH_VERSION SSH_PORTABLE
43+#ifdef SSH_EXTRAVERSION
44+#define SSH_RELEASE SSH_RELEASE_MINIMUM " " SSH_EXTRAVERSION
45+#else
46+#define SSH_RELEASE SSH_RELEASE_MINIMUM
47+#endif