summaryrefslogtreecommitdiff
path: root/security/ssh2/patches
diff options
context:
space:
mode:
authorkivinen <kivinen>2006-11-02 12:31:58 +0000
committerkivinen <kivinen>2006-11-02 12:31:58 +0000
commit4c1b8411e7e758746105a4f47171ea77b327413a (patch)
treeb0b34a6bb158619ad65e706b527a08204e92ffe1 /security/ssh2/patches
parent87fc81f1363bbce0d896e8abc3e300cce0d21117 (diff)
downloadpkgsrc-4c1b8411e7e758746105a4f47171ea77b327413a.tar.gz
Added missing fflush to scp when priting statistics. Fixed bug
in the reverse dns queries for IPv6 addresses (overwriting 12 bytes of local variables on the stack). Disabled x11-security on all platforms, as it does not seem to work on i386 either. Incremented PKGREVISION to 7.
Diffstat (limited to 'security/ssh2/patches')
-rw-r--r--security/ssh2/patches/patch-bh12
-rw-r--r--security/ssh2/patches/patch-bi41
2 files changed, 53 insertions, 0 deletions
diff --git a/security/ssh2/patches/patch-bh b/security/ssh2/patches/patch-bh
new file mode 100644
index 00000000000..2d1bd9bbe55
--- /dev/null
+++ b/security/ssh2/patches/patch-bh
@@ -0,0 +1,12 @@
+$NetBSD: patch-bh,v 1.1 2006/11/02 12:31:58 kivinen Exp $
+
+--- apps/ssh/scp2.c.orig 2003-12-03 15:17:22.000000000 +0200
++++ apps/ssh/scp2.c
+@@ -833,6 +833,7 @@ void scp_simple_progress_cb(SshFileCopyC
+
+ fprintf(stdout, "%s | %4sB | %4sB/s | TOC: %s\r\n",
+ file_name, num_buffer, tr_rate_buffer, toc_buffer);
++ fflush(stdout);
+ ssh_xfree(file_name);
+ }
+
diff --git a/security/ssh2/patches/patch-bi b/security/ssh2/patches/patch-bi
new file mode 100644
index 00000000000..cbaa3eae295
--- /dev/null
+++ b/security/ssh2/patches/patch-bi
@@ -0,0 +1,41 @@
+$NetBSD: patch-bi,v 1.1 2006/11/02 12:31:58 kivinen Exp $
+
+--- lib/sshutil/sshnet/sshunixtcp.c.orig 2003-12-03 15:17:31.000000000 +0200
++++ lib/sshutil/sshnet/sshunixtcp.c
+@@ -1459,7 +1459,6 @@ char *ssh_tcp_get_host_by_addr_sync(cons
+ #else /* VXWORKS */
+ unsigned char outbuf[16];
+ size_t outbuflen = 16;
+- struct in_addr in_addr;
+ struct hostent *hp;
+ char *name;
+ int i;
+@@ -1467,8 +1466,16 @@ char *ssh_tcp_get_host_by_addr_sync(cons
+ if (!ssh_inet_strtobin(addr, outbuf, &outbuflen))
+ return NULL;
+
+- memmove(&in_addr.s_addr, outbuf, outbuflen);
+- hp = gethostbyaddr((char *)&in_addr, sizeof(struct in_addr), AF_INET);
++#ifdef AF_INET6
++ hp = gethostbyaddr((char *)outbuf, outbuflen,
++ (outbuflen == 16) ? AF_INET6 : AF_INET);
++#else /* AF_INET6 */
++ if (outbuflen == 16)
++ return NULL;
++ hp = gethostbyaddr((char *)outbuf, outbuflen,
++ AF_INET);
++#endif /* AF_INET6 */
++
+ if (!hp)
+ return NULL;
+
+@@ -1491,7 +1498,8 @@ char *ssh_tcp_get_host_by_addr_sync(cons
+
+ /* Look for the address from the list of addresses. */
+ for (i = 0; hp->h_addr_list[i]; i++)
+- if (memcmp(hp->h_addr_list[i], &in_addr, sizeof(in_addr)) == 0)
++ if (hp->h_length == outbuflen &&
++ memcmp(hp->h_addr_list[i], outbuf, outbuflen) == 0)
+ break;
+ /* If we reached the end of the list, the address was not there. */
+ if (!hp->h_addr_list[i])