head 1.2; access; symbols pkgsrc-2013Q2:1.2.0.4 pkgsrc-2013Q2-base:1.2 pkgsrc-2012Q4:1.2.0.2 pkgsrc-2012Q4-base:1.2 pkgsrc-2012Q3:1.1.0.52 pkgsrc-2012Q3-base:1.1 pkgsrc-2012Q2:1.1.0.50 pkgsrc-2012Q2-base:1.1 pkgsrc-2012Q1:1.1.0.48 pkgsrc-2012Q1-base:1.1 pkgsrc-2011Q4:1.1.0.46 pkgsrc-2011Q4-base:1.1 pkgsrc-2011Q3:1.1.0.44 pkgsrc-2011Q3-base:1.1 pkgsrc-2011Q2:1.1.0.42 pkgsrc-2011Q2-base:1.1 pkgsrc-2011Q1:1.1.0.40 pkgsrc-2011Q1-base:1.1 pkgsrc-2010Q4:1.1.0.38 pkgsrc-2010Q4-base:1.1 pkgsrc-2010Q3:1.1.0.36 pkgsrc-2010Q3-base:1.1 pkgsrc-2010Q2:1.1.0.34 pkgsrc-2010Q2-base:1.1 pkgsrc-2010Q1:1.1.0.32 pkgsrc-2010Q1-base:1.1 pkgsrc-2009Q4:1.1.0.30 pkgsrc-2009Q4-base:1.1 pkgsrc-2009Q3:1.1.0.28 pkgsrc-2009Q3-base:1.1 pkgsrc-2009Q2:1.1.0.26 pkgsrc-2009Q2-base:1.1 pkgsrc-2009Q1:1.1.0.24 pkgsrc-2009Q1-base:1.1 pkgsrc-2008Q4:1.1.0.22 pkgsrc-2008Q4-base:1.1 pkgsrc-2008Q3:1.1.0.20 pkgsrc-2008Q3-base:1.1 cube-native-xorg:1.1.0.18 cube-native-xorg-base:1.1 pkgsrc-2008Q2:1.1.0.16 pkgsrc-2008Q2-base:1.1 cwrapper:1.1.0.14 pkgsrc-2008Q1:1.1.0.12 pkgsrc-2008Q1-base:1.1 pkgsrc-2007Q4:1.1.0.10 pkgsrc-2007Q4-base:1.1 pkgsrc-2007Q3:1.1.0.8 pkgsrc-2007Q3-base:1.1 pkgsrc-2007Q2:1.1.0.6 pkgsrc-2007Q2-base:1.1 pkgsrc-2007Q1:1.1.0.4 pkgsrc-2007Q1-base:1.1 pkgsrc-2006Q4:1.1.0.2 pkgsrc-2006Q4-base:1.1; locks; strict; comment @# @; 1.2 date 2012.12.12.22.04.51; author gendalia; state dead; branches; next 1.1; 1.1 date 2006.11.02.12.31.58; author kivinen; state Exp; branches; next ; desc @@ 1.2 log @"Hygiene demands it." Sources are from 2003, current tectia client/server has vulnterabilities, there are no security eyes on this version. @ text @$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]) @ 1.1 log @ 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. @ text @d1 1 a1 1 $NetBSD$ @