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.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/debian/patches/package-versioning.patch b/debian/patches/package-versioning.patch
new file mode 100644
index 000000000..ffd416d98
--- /dev/null
+++ b/debian/patches/package-versioning.patch
@@ -0,0 +1,50 @@
1Description: Include the Debian version in our identification
2 This makes it easier to audit networks for versions patched against
3 security vulnerabilities. It has little detrimental effect, as attackers
4 will generally just try attacks rather than bothering to scan for
5 vulnerable-looking version strings. (However, see debian-banner.patch.)
6Author: Matthew Vernon <matthew@debian.org>
7Forwarded: not-needed
8Last-Update: 2010-02-28
9
10Index: b/sshconnect.c
11===================================================================
12--- a/sshconnect.c
13+++ b/sshconnect.c
14@@ -556,7 +556,7 @@
15 snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s%s",
16 compat20 ? PROTOCOL_MAJOR_2 : PROTOCOL_MAJOR_1,
17 compat20 ? PROTOCOL_MINOR_2 : minor1,
18- SSH_VERSION, compat20 ? "\r\n" : "\n");
19+ SSH_RELEASE, compat20 ? "\r\n" : "\n");
20 if (roaming_atomicio(vwrite, connection_out, buf, strlen(buf))
21 != strlen(buf))
22 fatal("write: %.100s", strerror(errno));
23Index: b/sshd.c
24===================================================================
25--- a/sshd.c
26+++ b/sshd.c
27@@ -422,7 +422,7 @@
28 minor = PROTOCOL_MINOR_1;
29 }
30 snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s%s", major, minor,
31- SSH_VERSION, newline);
32+ SSH_RELEASE, newline);
33 server_version_string = xstrdup(buf);
34
35 /* Send our protocol version identification. */
36Index: b/version.h
37===================================================================
38--- a/version.h
39+++ b/version.h
40@@ -3,4 +3,9 @@
41 #define SSH_VERSION "OpenSSH_5.7"
42
43 #define SSH_PORTABLE "p1"
44-#define SSH_RELEASE SSH_VERSION SSH_PORTABLE
45+#define SSH_RELEASE_MINIMUM SSH_VERSION SSH_PORTABLE
46+#ifdef SSH_EXTRAVERSION
47+#define SSH_RELEASE SSH_RELEASE_MINIMUM " " SSH_EXTRAVERSION
48+#else
49+#define SSH_RELEASE SSH_RELEASE_MINIMUM
50+#endif