summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-11-03 08:47:42 +0000
committerMike Frysinger <vapier@gentoo.org>2008-11-03 08:47:42 +0000
commite6f713d37d38435b4b59c54188cb1252b623a33f (patch)
treeaff6b07dc1a72248869967985aed6c325fa43e4f /net-misc/openssh/files
parentarm/s390/sh stable (diff)
downloadhistorical-e6f713d37d38435b4b59c54188cb1252b623a33f.tar.gz
historical-e6f713d37d38435b4b59c54188cb1252b623a33f.tar.bz2
historical-e6f713d37d38435b4b59c54188cb1252b623a33f.zip
Fix some issues with printing of banners #244222 by Michał Górny.
Package-Manager: portage-2.2_rc13/cvs/Linux 2.6.27.4 x86_64
Diffstat (limited to 'net-misc/openssh/files')
-rw-r--r--net-misc/openssh/files/openssh-5.1_p1-escaped-banner.patch18
-rw-r--r--net-misc/openssh/files/openssh-5.1_p1-null-banner.patch35
2 files changed, 53 insertions, 0 deletions
diff --git a/net-misc/openssh/files/openssh-5.1_p1-escaped-banner.patch b/net-misc/openssh/files/openssh-5.1_p1-escaped-banner.patch
new file mode 100644
index 000000000000..440772245d6f
--- /dev/null
+++ b/net-misc/openssh/files/openssh-5.1_p1-escaped-banner.patch
@@ -0,0 +1,18 @@
+don't escape the banner output
+
+http://bugs.gentoo.org/244222
+https://bugzilla.mindrot.org/show_bug.cgi?id=1533
+
+fix by Michał Górny <mgorny.3ehbo@mailnull.com>
+
+--- sshconnect2.c
++++ sshconnect2.c
+@@ -415,7 +415,7 @@ input_userauth_banner(int type, u_int32_t seq, void *ctxt)
+ if (len > 65536)
+ len = 65536;
+ msg = xmalloc(len * 4 + 1); /* max expansion from strnvis() */
+- strnvis(msg, raw, len * 4 + 1, VIS_SAFE|VIS_OCTAL);
++ strnvis(msg, raw, len * 4 + 1, VIS_SAFE|VIS_OCTAL|VIS_NOSLASH);
+ fprintf(stderr, "%s", msg);
+ xfree(msg);
+ }
diff --git a/net-misc/openssh/files/openssh-5.1_p1-null-banner.patch b/net-misc/openssh/files/openssh-5.1_p1-null-banner.patch
new file mode 100644
index 000000000000..79e5a6c26476
--- /dev/null
+++ b/net-misc/openssh/files/openssh-5.1_p1-null-banner.patch
@@ -0,0 +1,35 @@
+apply fixes from upstream for empty banner
+
+https://bugzilla.mindrot.org/show_bug.cgi?id=1496
+http://bugs.gentoo.org/244222
+
+----------------------------
+revision 1.168
+date: 2008/10/03 23:56:28; author: deraadt; state: Exp; lines: +3 -3
+Repair strnvis() buffersize of 4*n+1, with termination gauranteed by the
+function.
+spotted by des@freebsd, who commited an incorrect fix to the freebsd tree
+and (as is fairly typical) did not report the problem to us. But this fix
+is correct.
+ok djm
+----------------------------
+revision 1.167
+date: 2008/07/31 14:48:28; author: markus; state: Exp; lines: +2 -2
+don't allocate space for empty banners; report t8m at centrum.cz; ok deraadt
+--- src/usr.bin/ssh/sshconnect2.c 2008/07/17 09:48:00 1.166
++++ src/usr.bin/ssh/sshconnect2.c 2008/10/04 00:56:28 1.168
+@@ -377,11 +377,11 @@ input_userauth_banner(int type, u_int32_t seq, void *c
+ debug3("input_userauth_banner");
+ raw = packet_get_string(&len);
+ lang = packet_get_string(NULL);
+- if (options.log_level >= SYSLOG_LEVEL_INFO) {
++ if (len > 0 && options.log_level >= SYSLOG_LEVEL_INFO) {
+ if (len > 65536)
+ len = 65536;
+- msg = xmalloc(len * 4); /* max expansion from strnvis() */
+- strnvis(msg, raw, len * 4, VIS_SAFE|VIS_OCTAL);
++ msg = xmalloc(len * 4 + 1); /* max expansion from strnvis() */
++ strnvis(msg, raw, len * 4 + 1, VIS_SAFE|VIS_OCTAL);
+ fprintf(stderr, "%s", msg);
+ xfree(msg);
+ }